-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.25 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
name: Lint
on:
pull_request:
branches: [ main ]
jobs:
lint:
strategy:
fail-fast: false
matrix:
linter: [
{"name": "flake8", "format": "flake8", "cwd": ".", "cmd": "flake8 ."},
{"name": "mypy", "format": "mypy", "cwd": ".", "cmd": "mypy ."},
{"name": "pylint", "format": "pylint-json", "cwd": ".", "cmd": "pylint --load-plugins pylint_pytest $(Get-ChildItem -Filter *.py -Recurse .)"},
]
name: ${{ matrix.linter.name }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python dependencies
run: |
py -3.11 -m pip install --upgrade pip
py -3.11 -m pip install -r dev-requirements.txt
py -3.11 -m pip install git+https://github.com/bugale/Bugalintly.git@bugalintly
- name: Lint
run: |
cd ${{ matrix.linter.cwd }}
${{ matrix.linter.cmd }} > lint.log
$exitcode = $LASTEXITCODE
type lint.log | Lintly --log --no-request-changes --no-review-body --base-dir . --format=${{ matrix.linter.format }} --comment-tag=${{ matrix.linter.name }}
exit $exitcode
env:
LINTLY_API_KEY: ${{ secrets.GITHUB_TOKEN }}