Skip to content

Commit 6bf9350

Browse files
felixxmmjpieters
authored andcommitted
Simplified caching in Github actions configuration.
1 parent ff9f159 commit 6bf9350

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

.github/workflows/ci.yml

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

CHANGES/694.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Simplified cache handling in GitHub workflows.

0 commit comments

Comments
 (0)