-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (48 loc) · 1.35 KB
/
python-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
44
45
46
47
48
49
50
name: python lint
on:
push:
paths:
- '**.py'
- '.github/workflows/python-lint.yaml'
- 'api/setup.cfg'
- 'cli/setup.cfg'
- 'api/pyproject.toml'
- 'cli/pyproject.toml'
jobs:
python-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- directory: "cli/"
name: "cli-linter"
- directory: "api/"
name: "api-linter"
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.11
- name: Install Python dependencies
run: pip install -r ${{ matrix.directory }}requirements.txt
- name: Install Python linting dependencies
run: pip install black flake8 mypy pylint
- name: Run linters
uses: wearerequired/lint-action@v2
with:
auto_fix: false
continue_on_error: false
mypy: true
mypy_dir: ${{ matrix.directory }}
flake8: true
flake8_dir: ${{ matrix.directory }}
black: true
black_args: --config pyproject.toml
black_dir: ${{ matrix.directory }}
black_auto_fix: true
pylint: true
pylint_args: --rcfile pyproject.toml
pylint_dir: ${{ matrix.directory }}