Skip to content

Commit f31428e

Browse files
committed
Replace cache action with setup-python feature.
1 parent 9dba16b commit f31428e

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,8 @@ jobs:
3535
uses: actions/setup-python@v6
3636
with:
3737
python-version: ${{ matrix.python-version }}
38-
39-
- name: Get pip cache info
40-
id: pip-cache
41-
run: |
42-
echo dir=$(python -m pip cache dir) >> $GITHUB_OUTPUT
43-
echo py=$(python -c'import sys; print("%d.%d" % sys.version_info[:2])') >> $GITHUB_OUTPUT
44-
echo dir=$(python -m pip cache dir)
45-
echo py=$(python -c'import sys; print("%d.%d" % sys.version_info[:2])')
46-
47-
- name: Cache pip
48-
uses: actions/cache@v5
49-
with:
50-
path: ${{ steps.pip-cache.outputs.dir }}
51-
key: ${{ runner.os }}-pip-py${{ steps.pip-cache.outputs.py }}-${{ hashFiles('setup.cfg') }}
52-
restore-keys: ${{ runner.os }}-pip-py${{ steps.pip-cache.outputs.py }}-
38+
cache: pip
39+
cache-dependency-path: setup.cfg
5340

5441
- name: Install dependencies
5542
run: python -m pip install -e .

0 commit comments

Comments
 (0)