-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (65 loc) · 1.72 KB
/
lint.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint_docs:
name: rstcheck
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: pip install -U rstcheck doc8 sphinx
- name: Run rstcheck
run: rstcheck -r docs
- name: Run doc8
run: doc8 --ignore D001 docs
python_black:
name: black formatter
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: ". --check --safe --verbose"
version: "22.3.0"
pyright:
name: pyright
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install importlib-resources
pip install .[lint_requires,tests_require]
- name: Analysing the code with pyright
run: |
pyright $(git ls-files '*.py')
isort:
name: isort
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.6
- uses: isort/isort-action@master
with:
requirementsFiles: "pyproject.toml"