-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (48 loc) · 1.37 KB
/
linter.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
55
56
57
58
59
60
61
62
name: Test (linter/formatter)
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
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: |
pip install --upgrade uv
uv pip sync --system --break-system-packages requirements.lock
- name: Check YAML files
run: |
pre-commit run check-yaml --all-files
- name: Check file endings
run: |
pre-commit run end-of-file-fixer --all-files
- name: Check trailing whitespace
run: |
pre-commit run trailing-whitespace --all-files
- name: Check TOML files
run: |
pre-commit run check-toml --all-files
- name: Check large files
run: |
pre-commit run check-added-large-files --all-files
- name: Run isort
run: |
isort --check --diff $(git ls-files '*.py')
- name: Run black
run: |
black --check --diff $(git ls-files '*.py')
- name: Run ruff
run: |
ruff check $(git ls-files '*.py')
- name: Run mypy
run: |
mypy $(git ls-files '*.py')
- name: Run pylint
run: |
pylint --rcfile=pyproject.toml $(git ls-files '*.py')