Skip to content

Commit c171ccd

Browse files
committed
Use setup-python's cache instead of cache action
See setup-python's docs on caching: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages
1 parent e375098 commit c171ccd

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,10 @@ jobs:
6565
uses: actions/setup-python@v4
6666
with:
6767
python-version: ${{ matrix.python-version }}
68-
69-
- name: Get pip cache dir
70-
id: pip-cache
71-
run: |
72-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
73-
74-
- name: Cache
75-
uses: actions/cache@v3
76-
with:
77-
path: ${{ steps.pip-cache.outputs.dir }}
78-
key:
79-
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
80-
restore-keys: |
81-
${{ matrix.python-version }}-v1-
68+
cache: 'pip'
69+
cache-dependency-path: |
70+
setup.py
71+
tox.ini
8272
8373
- name: Install dependencies
8474
run: |

0 commit comments

Comments
 (0)