Skip to content

Commit 55bac8a

Browse files
committed
Simplified caching in Github actions configuration.
1 parent 371fdeb commit 55bac8a

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,8 @@ jobs:
2727
uses: actions/setup-python@v3
2828
with:
2929
python-version: 3.8
30-
- name: Cache PyPI
31-
uses: actions/cache@v2
32-
with:
33-
key: pip-lint-${{ hashFiles('requirements/*.txt') }}
34-
path: ~/.cache/pip
35-
restore-keys: |
36-
pip-lint-
30+
cache: 'pip'
31+
cache-dependency-path: 'requirements/*.txt'
3732
- name: Install dependencies
3833
uses: py-actions/py-dependency-install@v3
3934
with:
@@ -89,17 +84,8 @@ jobs:
8984
uses: actions/setup-python@v3
9085
with:
9186
python-version: ${{ matrix.pyver }}
92-
- name: Get pip cache dir
93-
id: pip-cache
94-
run: |
95-
echo "::set-output name=dir::$(pip cache dir)" # - name: Cache
96-
- name: Cache PyPI
97-
uses: actions/cache@v2
98-
with:
99-
key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-{{ matrix.no-extensions }}-${{ hashFiles('requirements/*.txt') }}
100-
path: ${{ steps.pip-cache.outputs.dir }}
101-
restore-keys: |
102-
pip-ci-${{ runner.os }}-${{ matrix.pyver }}-{{ matrix.no-extensions }}-
87+
cache: 'pip'
88+
cache-dependency-path: 'requirements/*.txt'
10389
- name: Install cython
10490
if: ${{ matrix.no-extensions == '' }}
10591
uses: py-actions/py-dependency-install@v3

0 commit comments

Comments
 (0)