Skip to content

Commit

Permalink
CI: Make setup-python responsible for caching (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpieters committed Nov 8, 2022
1 parent 31b492b commit d3c1483
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/ci.yml
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 @@ -89,17 +85,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyver }}
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)" # - name: Cache
- name: Cache PyPI
uses: actions/cache@v3
with:
key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-{{ matrix.no-extensions }}-${{ hashFiles('requirements/*.txt') }}
path: ${{ steps.pip-cache.outputs.dir }}
restore-keys: |
pip-ci-${{ runner.os }}-${{ matrix.pyver }}-{{ matrix.no-extensions }}-
cache: pip
cache-dependency-path:
requirements/*.txt
- name: Install dependencies
uses: py-actions/py-dependency-install@v3
with:
Expand Down Expand Up @@ -159,6 +147,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip
cache-dependency-path:
requirements/*.txt
- name: Install cython
uses: py-actions/py-dependency-install@v3
with:
Expand Down Expand Up @@ -212,6 +203,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip
cache-dependency-path:
requirements/*.txt
- name: Install cython
uses: py-actions/py-dependency-install@v3
with:
Expand Down

0 comments on commit d3c1483

Please sign in to comment.