-
-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (64 loc) · 1.89 KB
/
python-lint.yml
File metadata and controls
77 lines (64 loc) · 1.89 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
name: Python CI Lint
on: # yamllint disable-line rule:truthy
push:
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
workflow_dispatch:
jobs:
lint:
name: 'Python CI Lint'
strategy:
fail-fast: false
matrix:
os: ['ubuntu-24.04', 'macos-14', 'windows-2022']
python: ['3.12', '3.13', '3.14']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python }}
- name: Install tooling on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y pipenv
shell: bash
- name: Install tooling on macOS
if: runner.os == 'macOS'
run: |
brew install pipenv
shell: bash
- name: Install tooling on Windows
if: runner.os == 'Windows'
run: |
python -m pip install --user pipenv==2026.6.1
shell: pwsh
- name: Tooling check
run: |
python3 --version
pipenv --version
make --version
- name: Install
run: |
# Use the lockfile to install deterministic, audited dependencies
pipenv sync --dev
- name: Lint (pylint)
run: |
pipenv run pylint --verbose --recursive yes src/
- name: Lint (flake8)
run: |
pipenv run flake8 --verbose src/
- name: Lint (pyright) static type checker
run: |
pipenv run pyright --verbose src/
- name: Styling (pycodestyle)
run: |
pipenv run pycodestyle --statistics src/
- name: Styling (autopep8)
run: |
pipenv run autopep8 --diff --recursive --exit-code --verbose .