-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (35 loc) · 1.24 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
on: [push]
jobs:
build:
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint djlint black
- name: Lint Django templates with djlint
run: |
djlint --reformat --warn --configuration=webcentral/pyproject.toml $(git ls-files 'webcentral/**/*.html')
- name: Format Python code with black
run: |
black --config webcentral/pyproject.toml webcentral/
- name: Analysing the code with pylint
run: |
pylint $(git ls-files 'webcentral/**/*.py') --output=lint.txt || true
- name: Git Auto Commit
uses: stefanzweifel/[email protected]