-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (27 loc) · 901 Bytes
/
python_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
name: Lints and Typecheck
on: [pull_request]
jobs:
checks:
runs-on: ubuntu-latest
name: Lints and typecheck
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install aspell for pyspelling
run: sudo apt-get install -y aspell
- name: Upgrade pip
run: pip install --upgrade pip
- name: Install packages
run: pip install "flake8>=4.0.1" "black>=22.6.0" "mypy==0.981" "pyspelling>=2.8.2" # install 0.981 of mypy since future versions seem to be not working with `--exclude`
- name: flake8 lint
run: flake8 .
- name: black lint
run: black --diff --check .
- name: mypy typechecking
run: mypy .
- name: spellcheck
run: pyspelling