-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.05 KB
/
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
name: lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: install dependencies
run: |
python -m pip install -r requirements/minimal.txt
python -m pip install -r requirements/lint.txt
# Mypy wants to inspect pytest imports in the tests/ folder
python -m pip install -r requirements/test.txt
- name: black
run: black --check .
- name: flake8
run: |
flake8
# Warn about complex functions.
flake8 --exit-zero --max-complexity=10
- name: build
run: |
# Mypy wants to check the type of the version string.
# This comes after the black step because black doesn't like
# the version file generated by setuptool_scm.
python -m pip install build
python -m build
- name: mypy
run: mypy