-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (35 loc) · 923 Bytes
/
lint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: lint
on: push
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
check:
- isort --check .
- black --check .
- flake8 .
- mypy .
python_version: ["3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Poetry
uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-${{ matrix.python_version }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Set up Poetry
uses: snok/[email protected]
with:
virtualenvs-in-project: true
- name: Install dependencies
run: |
poetry install
- name: Run linter
run: |
poetry run ${{ matrix.check }}