Skip to content

Commit 9fa8df6

Browse files
committed
ci(github-actions): pre-commit cache
Fixes #1.
1 parent 357490c commit 9fa8df6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Tests
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
push:
66
pull_request:
77

@@ -21,11 +21,18 @@ jobs:
2121
uses: actions/cache@v2
2222
with:
2323
path: ~/.cache/pip
24-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
24+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
2525
restore-keys: |
2626
${{ runner.os }}-pip-
2727
- name: Install dependencies
2828
run: make install
29+
- name: Cache pre-commit
30+
uses: actions/cache@v2
31+
with:
32+
path: ~/.cache/pre-commit
33+
key: pre-commit-2--${hashFile('.pre-commit-config.yaml')}
34+
restore-keys: |
35+
pre-commit-2-
2936
- name: Lint
3037
run: SKIP=no-commit-to-branch make lint
3138
- name: Test

0 commit comments

Comments
 (0)