-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (42 loc) · 1.15 KB
/
pylint.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
name: Pylint code check
on:
workflow_run:
workflows: ["Reformat code"]
branches: [main]
types:
- completed
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install --requirement requirements.txt
pip install pylint
- name: Create log files
run: |
mkdir lint-logs
touch lint-logs/pylint.txt
echo LOGFILE_NAME="logs-$(python3 -V | cut -c 8-)" >> $GITHUB_ENV
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') --rcfile=pylintrc > lint-logs/pylint.txt
cat lint-logs/pylint.txt
- uses: actions/upload-artifact@v4
with:
name: ${{env.LOGFILE_NAME}}
path: lint-logs/
- name: Remove log files
run: |
rm -r lint-logs