Skip to content

Commit fa704ae

Browse files
authored
CI: let setup-python handle caching (#358)
1 parent 47cb30d commit fa704ae

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,9 @@ jobs:
2626
uses: actions/setup-python@v4
2727
with:
2828
python-version: 3.x
29-
- name: Cache PyPI
30-
uses: actions/cache@v3
31-
with:
32-
key: pip-lint-${{ hashFiles('requirements/*.txt') }}
33-
path: ~/.cache/pip
34-
restore-keys: |
35-
pip-lint-
29+
cache: pip
30+
cache-dependency-path: |
31+
requirements/*.txt
3632
- name: Install dependencies
3733
uses: py-actions/py-dependency-install@v3
3834
with:
@@ -82,18 +78,9 @@ jobs:
8278
uses: actions/setup-python@v4
8379
with:
8480
python-version: ${{ matrix.pyver }}
85-
- name: Get pip cache dir
86-
id: pip-cache
87-
shell: bash
88-
run: |
89-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
90-
- name: Cache PyPI
91-
uses: actions/cache@v3
92-
with:
93-
key: pip-ci-${{ runner.os }}-${{ matrix.pyver }}-${{ hashFiles('requirements/*.txt') }}
94-
path: ${{ steps.pip-cache.outputs.dir }}
95-
restore-keys: |
96-
pip-ci-${{ runner.os }}-${{ matrix.pyver }}-
81+
cache: pip
82+
cache-dependency-path: |
83+
requirements/*.txt
9784
- name: Install dependencies
9885
uses: py-actions/py-dependency-install@v3
9986
with:

0 commit comments

Comments
 (0)