Skip to content

Commit

Permalink
chore: replace custom cache step with config
Browse files Browse the repository at this point in the history
The `actions/setup-python@v2` and higher included a built-in cache
restore and post-run save step, meaning we can now retire our custom
steps for the configuration we want and gain some speed here.

Refs: actions/setup-python#266
Refs: https://github.com/actions/setup-python#caching-packages-dependencies

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
  • Loading branch information
miketheman committed Jun 15, 2022
1 parent 768d5e2 commit 5978f88
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/ci.yml
Expand Up @@ -68,18 +68,10 @@ jobs:
if: ${{ matrix.needs-python }}
with:
python-version-file: '.python-version'
- name: Cache Python dependencies
if: ${{ matrix.needs-python }}
uses: actions/cache@v3
env:
cache-name: warehouse-cache-pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
${{ runner.os }}-${{ github.job }}-
${{ runner.os }}-
cache: 'pip'
cache-dependency-path: |
requirements.txt
requirements/*.txt
- name: Install Python dependencies
if: ${{ matrix.needs-python }}
run: |
Expand Down

0 comments on commit 5978f88

Please sign in to comment.