Skip to content

Commit 4ac3cc2

Browse files
Split out linting CI from testing (#17)
1 parent 960c708 commit 4ac3cc2

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

.github/workflows/lint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
default:
7+
runs-on: ${{ matrix.os }}-latest
8+
strategy:
9+
matrix:
10+
os: [ubuntu]
11+
python-version: ["3.10"]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
- uses: actions/cache@v2
21+
with:
22+
path: ~/.cache/pip
23+
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
24+
restore-keys: |
25+
${{ runner.os }}-pip-
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install ".[lint]"
31+
32+
- name: Lint
33+
run: pre-commit run --all-files --show-diff-on-failure --color always

.github/workflows/test.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ jobs:
2828
run: |
2929
python -m pip install --upgrade pip
3030
pip install ".[test]"
31-
pip install ".[lint]"
32-
33-
- name: Lint
34-
run: pre-commit run --all-files --show-diff-on-failure --color always
3531
3632
- name: Test
3733
run: |

0 commit comments

Comments
 (0)