-
-
Notifications
You must be signed in to change notification settings - Fork 75
76 lines (71 loc) · 2.01 KB
/
run-linter.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
67
68
69
70
71
72
73
74
75
76
name: Run linter
on:
pull_request:
jobs:
linter:
name: Linter
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 20
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: x64
- name: Setup reviewdog
run: |
/usr/bin/sh utils/reviewdog_install.sh -b ./bin/ v0.20.3
- name: Install dependencies
run: |
pip install -U pip tox wheel setuptools setuptools_scm[toml]
- name: Lint checks
run: |
tox -e linter | ./bin/reviewdog -efm="%f:%l:%c: %m" -name="pylint" -reporter=github-pr-check -fail-level=error -level=warning
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
mypy:
name: mypy
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: tsuyoshicho/action-mypy@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
target: py7zr
reporter: github-pr-check
level: error
flake8-lint:
runs-on: ubuntu-22.04
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install .[check]
- name: flake8 Lint
uses: reviewdog/action-flake8@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
level: error
docs:
name: Document checks
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: x64
- name: Install dependencies
run: |
pip install -U pip tox wheel setuptools setuptools_scm[toml]
- name: docs build and link check
run: |
tox -e docs