-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (60 loc) · 1.46 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Python Linting
on:
push:
branches:
- master
pull_request:
branches:
- "*"
workflow_dispatch:
jobs:
pylint:
name: Pylint
runs-on: self-hosted
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
pip3 install pylint
- name: Run pylint
run: |
pylint ${PWD}/src/** > pylint_output.txt
continue-on-error: true
- name: Check pylint results
run: |
cat pylint_output.txt
if ! grep -q "Your code has been rated at 10.00/10" pylint_output.txt; then
echo "Pylint issues found!"
exit 1
fi
pyright:
name: Pyright
runs-on: self-hosted
timeout-minutes: 15
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- name: Run Pyright
run: poetry run pyright > pyright_output.txt
continue-on-error: true
- name: Check Pyright results
run: |
cat pyright_output.txt
if ! grep -q "0 errors, 0 warnings" pyright_output.txt; then
echo "Pyright issues found!"
exit 1
fi