File tree Expand file tree Collapse file tree 1 file changed +14
-26
lines changed Expand file tree Collapse file tree 1 file changed +14
-26
lines changed Original file line number Diff line number Diff line change
1
+ name : pre-commit
1
2
jobs :
2
- lint-multi-os :
3
- name : Lint ${{ matrix.os }}
3
+ main :
4
4
runs-on : ${{ matrix.os }}
5
5
steps :
6
- - uses : actions/checkout@v2
7
- - uses : actions/setup-python@v1
8
- with :
9
- python-version : 3.x
10
- - uses : actions/cache@v1
11
- with :
12
- key : v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
13
- path : ~/.cache/pip
14
- restore-keys : |
15
- v0-${{ runner.os }}-pip-lint-
16
- v0-${{ runner.os }}-pip-
17
- - name : Install dependencies
18
- run : |
19
- python -m pip install --upgrade pip
20
- pip install .[lint]
21
- - name : Run black
22
- run : black --check --verbose .
23
- - name : Run flake8
24
- run : flake8 --exclude docs --statistics
25
- - name : Run isort
26
- run : isort -cv .
27
- - name : Run sphinx
28
- run : sphinx-build -W --keep-going docs/ /tmp/foo
6
+ - uses : actions/checkout@v2
7
+ - uses : actions/setup-python@v2
8
+ with :
9
+ python-version : ${{ matrix.python-version }}
10
+ - uses : pre-commit/action@v2.0.3
11
+ - name : Set Python version
12
+ run : echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
13
+ - uses : actions/cache@v1
14
+ with :
15
+ path : ~/.cache/pre-commit
16
+ key : pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
29
17
strategy :
30
18
matrix :
19
+ python-version : ["3.9"]
31
20
os : [macOS-latest, ubuntu-latest, windows-latest]
32
- name : CI
33
21
on : [pull_request, push]
You can’t perform that action at this time.
0 commit comments