-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 1.15 KB
/
linters.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
name: Linters (Pylint, MyPy)
on:
pull_request:
branches: ["main", "dev"]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
name: Linters
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install --upgrade pip
working-directory: "src/"
- name: Install linters
run: pip install pylint==v3.0.0a3 mypy==v0.902
working-directory: "src/app/"
- name: PyLint lint.
run: pylint --disable=import-error --disable=line-too-long --disable=too-few-public-methods --disable=fixme --disable=no-name-in-module --disable=invalid-name --disable=duplicate-code --disable=too-many-arguments $(git ls-files '*.py')
working-directory: "src/app/"
- name: All PyLint warning.
run: pylint $(git ls-files '*.py') || true
working-directory: "src/app/"
- name: MyPy type check.
working-directory: "src/app/"
run: mypy $(git ls-files '*.py') || true