File tree Expand file tree Collapse file tree 1 file changed +24
-5
lines changed Expand file tree Collapse file tree 1 file changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,30 @@ jobs:
11
11
runs-on : ubuntu-latest
12
12
13
13
steps :
14
- - uses : actions/checkout@v4
15
- - uses : actions/setup-python@v5
14
+ - name : Check out repository
15
+ uses : actions/checkout@v4
16
+ - name : Set up python
17
+ id : setup-python
18
+ uses : actions/setup-python@v5
16
19
with :
17
- python-version : ' 3.10 '
20
+ python-version : ' 3.11 '
18
21
- name : Install dependencies
19
22
run : make install
20
- - name : Run lint
21
- run : make lint || { git diff; false; }
23
+ - name : Load cached pre-commit env
24
+ id : cached-pre-commit
25
+ uses : actions/cache@v4
26
+ with :
27
+ path : ~/.cache/pre-commit
28
+ key : pre-commit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
29
+ - name : Install pre-commit hooks
30
+ run : |
31
+ mkdir -p ~/.cache/pre-commit
32
+ true > ~/.cache/pre-commit/pre-commit.log
33
+ pre-commit install-hooks --color=always
34
+ retval="$?"
35
+ if [ "$retval" -ne 0 ]; then
36
+ cat ~/.cache/pre-commit/pre-commit.log
37
+ fi
38
+ exit "$retval"
39
+ - name : Run pre-commit linters
40
+ run : pre-commit run -a --show-diff-on-failure --color=always
You can’t perform that action at this time.
0 commit comments