Skip to content

Commit a01cee5

Browse files
authored
Update pylint.yml
1 parent e1688ff commit a01cee5

1 file changed

Lines changed: 25 additions & 17 deletions

File tree

.github/workflows/pylint.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
name: Pylint
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
48

59
jobs:
6-
build:
10+
pylint:
711
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
python-version: ["3.10"]
12+
1113
steps:
12-
- uses: actions/checkout@v4
13-
- name: Set up Python ${{ matrix.python-version }}
14-
uses: actions/setup-python@v3
15-
with:
16-
python-version: ${{ matrix.python-version }}
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install pylint
21-
- name: Analysing the code with pylint
22-
run: |
23-
pylint $(git ls-files '*.py')
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.10" # ← ONLY ONE VERSION
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install pylint
26+
# If you have requirements:
27+
# pip install -r requirements.txt
28+
29+
- name: Run pylint
30+
run: |
31+
pylint your_package_or_files/

0 commit comments

Comments
 (0)