Skip to content

Commit

Permalink
CI: let setup-python handle caching (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpieters authored Nov 8, 2022
1 parent 47cb30d commit fa704ae
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Cache PyPI
uses: actions/cache@v3
with:
key: pip-lint-${{ hashFiles('requirements/*.txt') }}
path: ~/.cache/pip
restore-keys: |
pip-lint-
cache: pip
cache-dependency-path: |
requirements/*.txt
- name: Install dependencies
uses: py-actions/py-dependency-install@v3
with:
Expand Down Expand Up @@ -82,18 +78,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyver }}
- name: Get pip cache dir
id: pip-cache
shell: bash
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache PyPI
uses: actions/cache@v3
with:
key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-${{ hashFiles('requirements/*.txt') }}
path: ${{ steps.pip-cache.outputs.dir }}
restore-keys: |
pip-ci-${{ runner.os }}-${{ matrix.pyver }}-
cache: pip
cache-dependency-path: |
requirements/*.txt
- name: Install dependencies
uses: py-actions/py-dependency-install@v3
with:
Expand Down

0 comments on commit fa704ae

Please sign in to comment.