-
Notifications
You must be signed in to change notification settings - Fork 35
54 lines (51 loc) · 1.42 KB
/
lint-format.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
46
47
48
49
50
51
52
53
54
name: Formatter
on:
pull_request:
push:
env:
SKIP: pylint,isort,black
jobs:
Formatter:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
- uses: isort/[email protected]
with:
configuration: "--settings-file=.isort.cfg"
requirements-files: "requirements.txt"
- uses: psf/black@stable
with:
options: "--line-length=120"
version: "24.2.0"
- uses: stefanzweifel/[email protected]
with:
commit_message: "Format code with isort and black"
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- uses: pre-commit/[email protected]
Pylint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') --rcfile=$(git ls-files '.pylintrc')