Skip to content

Commit 1a43a04

Browse files
authored
Simplified caching in Github actions configuration. (#694)
1 parent 1910f52 commit 1a43a04

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

.github/workflows/ci.yml

+4-18
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,8 @@ jobs:
3232
uses: actions/setup-python@v3
3333
with:
3434
python-version: 3.8
35-
- name: Cache PyPI
36-
uses: actions/cache@v3
37-
with:
38-
key: pip-lint-${{ hashFiles('requirements/*.txt') }}
39-
path: ~/.cache/pip
40-
restore-keys: |
41-
pip-lint-
35+
cache: 'pip'
36+
cache-dependency-path: 'requirements/*.txt'
4237
- name: Install dependencies
4338
uses: py-actions/py-dependency-install@v3
4439
with:
@@ -94,17 +89,8 @@ jobs:
9489
uses: actions/setup-python@v3
9590
with:
9691
python-version: ${{ matrix.pyver }}
97-
- name: Get pip cache dir
98-
id: pip-cache
99-
run: |
100-
echo "::set-output name=dir::$(pip cache dir)" # - name: Cache
101-
- name: Cache PyPI
102-
uses: actions/cache@v3
103-
with:
104-
key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-{{ matrix.no-extensions }}-${{ hashFiles('requirements/*.txt') }}
105-
path: ${{ steps.pip-cache.outputs.dir }}
106-
restore-keys: |
107-
pip-ci-${{ runner.os }}-${{ matrix.pyver }}-{{ matrix.no-extensions }}-
92+
cache: 'pip'
93+
cache-dependency-path: 'requirements/*.txt'
10894
- name: Install cython
10995
if: ${{ matrix.no-extensions == '' }}
11096
uses: py-actions/py-dependency-install@v3

CHANGES/694.misc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Simplified cache handling in GitHub workflows.

0 commit comments

Comments
 (0)