Skip to content

Fix pip cache ordering: move checkout first, use setup-python built-in cache#71

Merged
C-Achard merged 4 commits intoMMathisLab-pypifrom
copilot/sub-pr-69-again
Mar 23, 2026
Merged

Fix pip cache ordering: move checkout first, use setup-python built-in cache#71
C-Achard merged 4 commits intoMMathisLab-pypifrom
copilot/sub-pr-69-again

Conversation

Copy link

Copilot AI commented Mar 23, 2026

actions/cache ran before actions/checkout, so hashFiles(...) evaluated against an empty workspace — producing a constant cache key and making dependency caching effectively a no-op.

Changes

  • Moved actions/checkout to be the first step so all subsequent steps have access to workspace files
  • Replaced manual actions/cache with setup-python's built-in cache: pip — eliminates the ordering problem entirely and reduces boilerplate
- name: Checkout code
  uses: actions/checkout@v4

- name: Setup Python
  uses: actions/setup-python@v5
  with:
    python-version: '3.x'
    cache: 'pip'
    cache-dependency-path: |
      pyproject.toml
      requirements.txt
      setup.cfg
      setup.py

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] [WIP] Address feedback on Python package release workflow refactor Fix pip cache ordering: move checkout first, use setup-python built-in cache Mar 23, 2026
Copilot AI requested a review from MMathisLab March 23, 2026 14:22
@C-Achard C-Achard marked this pull request as ready for review March 23, 2026 15:12
Update .github/workflows/python-package.yml to use actions/checkout@v6 and actions/setup-python@v6. Keeps the workflow up-to-date with no functional changes to Python version or caching.
Update GitHub Actions workflow to use pyproject.toml as the sole cache-dependency-path for pip, removing requirements.txt, setup.cfg, and setup.py to avoid unnecessary cache invalidation. Add a clarifying comment and clean up trailing whitespace in the workflow file.
@C-Achard C-Achard merged commit c971bf3 into MMathisLab-pypi Mar 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants