1
+ name : Linter
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+
7
+ black :
8
+ runs-on : ubuntu-22.04
9
+ steps :
10
+ - uses : actions/checkout@v3
11
+ - uses : psf/black@stable
12
+ with :
13
+ options : " --check --verbose"
14
+ version : " 23.12.1"
15
+
16
+ isort :
17
+ runs-on : ubuntu-22.04
18
+ steps :
19
+ - uses : actions/checkout@v3
20
+ - name : Set up Python 3.10
21
+ uses : actions/setup-python@v4
22
+ with :
23
+ python-version : " 3.10"
24
+ cache : ' pip' # caching pip dependencies
25
+ - name : Install dependencies
26
+ run : |
27
+ python -m pip install --upgrade pip
28
+ pip install .[dev]
29
+ - name : Check import order
30
+ run : isort . -c
31
+
32
+ flake8 :
33
+ runs-on : ubuntu-22.04
34
+ steps :
35
+ - uses : actions/checkout@v3
36
+ - name : Set up Python 3.10
37
+ uses : actions/setup-python@v4
38
+ with :
39
+ python-version : " 3.10"
40
+ cache : ' pip' # caching pip dependencies
41
+ - name : Install dependencies
42
+ run : |
43
+ python -m pip install --upgrade pip
44
+ pip install .[dev]
45
+ - name : Lint with flake8
46
+ run : |
47
+ # stop the build if there are Python syntax errors or undefined names
48
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
49
+ # option --exit-zero can be added to this line to set these errors as warnings
50
+ flake8 . --count --statistics --config setup.cfg
51
+
52
+ mypy :
53
+ runs-on : ubuntu-22.04
54
+ steps :
55
+ - uses : actions/checkout@v3
56
+ - name : Set up Python 3.10
57
+ uses : actions/setup-python@v4
58
+ with :
59
+ python-version : " 3.10"
60
+ cache : ' pip' # caching pip dependencies
61
+ - name : Install dependencies
62
+ run : |
63
+ python -m pip install --upgrade pip
64
+ pip install .[dev]
65
+ - name : Lint with mypy
66
+ run : mypy . -v
0 commit comments