Skip to content

Commit 4c58e6c

Browse files
authored
Cache python version dependencies
Signed-off-by: Jay Dev Jha <[email protected]>
1 parent fb32e97 commit 4c58e6c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/python-app.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,22 @@ jobs:
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323

24-
- name: Cache pre-commit environment
24+
- name: Cache pre-commit and coverage dependencies
2525
uses: actions/cache@v3
2626
with:
27-
path: ~/.cache/pre-commit
28-
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
27+
path: |
28+
~/.cache/pre-commit
29+
~/.cache/pip
30+
key: ${{ runner.os }}-dependencies-${{ hashFiles('.pre-commit-config.yaml') }}-${{ matrix.python-version }}
2931
restore-keys: |
30-
${{ runner.os }}-pre-commit-
32+
${{ runner.os }}-dependencies-${{ matrix.python-version }}-
33+
${{ runner.os }}-dependencies-
3134
3235
- name: Install dependencies
3336
run: python3 -m pip install pre-commit coverage
3437

3538
- name: Run pre-commit
36-
run: pre-commit run --all-files
39+
run: pre-commit run --from-ref origin/master --to-ref HEAD
3740

3841
- name: Generate
3942
run: coverage run ./parse.py -c -chisel -sverilog -rust -latex -spinalhdl -go "rv*" "unratified/rv*"

0 commit comments

Comments
 (0)