Skip to content

Commit bf10501

Browse files
authored
Update pylint.yml
1 parent 09beb3b commit bf10501

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

.github/workflows/pylint.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,44 @@
11
name: Pylint
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
pylint:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: ["3.8", "3.9", "3.10"]
10+
python-version: ["3.8", "3.9", "3.10", "3.11"]
11+
1112
steps:
1213
- uses: actions/checkout@v4
14+
1315
- name: Set up Python ${{ matrix.python-version }}
14-
uses: actions/setup-python@v3
16+
uses: actions/setup-python@v4
1517
with:
1618
python-version: ${{ matrix.python-version }}
19+
1720
- name: Install dependencies
1821
run: |
1922
python -m pip install --upgrade pip
23+
# Install your project dependencies if you have a requirements.txt
24+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25+
# Install pylint
2026
pip install pylint
27+
2128
- name: Analysing the code with pylint
2229
run: |
23-
pylint $(git ls-files '*.py')
30+
# Find all Python files and run pylint on them
31+
find . -type f -name "*.py" | xargs pylint --exit-zero
32+
# Alternative: Use git to find Python files (your original approach)
33+
# pylint $(git ls-files '*.py') --exit-zero
34+
35+
- name: Generate pylint report
36+
run: |
37+
# Generate a detailed report and save to file
38+
find . -type f -name "*.py" | xargs pylint --output-format=text --reports=yes > pylint-report.txt || true
39+
40+
- name: Upload pylint report
41+
uses: actions/upload-artifact@v3
42+
with:
43+
name: pylint-report-${{ matrix.python-version }}
44+
path: pylint-report.txt

0 commit comments

Comments
 (0)