Skip to content

Commit d45dd31

Browse files
authored
Update pre-commit_pytest.yml
1 parent ef3a029 commit d45dd31

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/pre-commit_pytest.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,22 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- uses: actions/setup-python@v3
15+
- uses: actions/setup-python@v4
1616
with:
1717
python-version: '3.10'
18+
- name: Get pip cache dir
19+
id: pip-cache
20+
run: |
21+
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
22+
- name: pip/pre-commit cache
23+
uses: actions/cache@v3
24+
with:
25+
path: |
26+
${{ steps.pip-cache.outputs.dir }}
27+
~/.cache/pre-commit
28+
key: ${{ runner.os }}-pip-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
29+
restore-keys: |
30+
${{ runner.os }}-pip-pre-commit
1831
- name: pre-commit
1932
run: |
2033
pip install -U pre-commit
@@ -59,4 +72,4 @@ jobs:
5972
pip3 install --upgrade coveralls
6073
coveralls --service=github --finish
6174
env:
62-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)