-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (36 loc) · 994 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
name: lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: install dependencies
run: |
python -m pip install \
-r requirements/minimal.txt \
-r requirements/lint.txt \
-r requirements/test.txt \
build
- name: black
run: black --check .
- name: flake8
run: |
flake8
# Warn about complex functions.
flake8 --exit-zero --max-complexity=10
- name: generate version string
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 setuptools_scm.
python -m build --sdist
- name: mypy
run: mypy