1+ name : Lint code
2+ on : [push, pull_request]
3+
4+ jobs :
5+ # Use ruff to check for code style violations
6+ ruff-check :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Checkout repo
10+ uses : actions/checkout@v4
11+ - name : Set up Python
12+ uses : actions/setup-python@v4
13+ with :
14+ python-version : " 3.14"
15+ - name : Install dependencies
16+ run : |
17+ python -m pip install --upgrade pip
18+ pip install ruff
19+ - name : ruff --> Check for style violations
20+ # Configured in pyproject.toml
21+ run : ruff check .
22+
23+ # Use ruff to check code formatting
24+ ruff-format :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout repo
28+ uses : actions/checkout@v4
29+ - name : Set up Python
30+ uses : actions/setup-python@v4
31+ with :
32+ python-version : " 3.14"
33+ - name : Install dependencies
34+ run : |
35+ python -m pip install --upgrade pip
36+ pip install ruff
37+ - name : ruff --> Check code formatting
38+ run : ruff format --check .
39+
40+ # Use mypy for static type checking
41+ mypy-check :
42+ runs-on : ubuntu-latest
43+ steps :
44+ - name : Checkout repo
45+ uses : actions/checkout@v4
46+ - name : Set up Python
47+ uses : actions/setup-python@v4
48+ with :
49+ python-version : " 3.14"
50+ - name : Install dependencies
51+ run : |
52+ python -m pip install --upgrade pip
53+ pip install mypy
54+ # Start by installing type stubs
55+ - name : mypy --> Install stubs
56+ run : mypy --install-types --non-interactive .
57+
58+ # Use pip-check-reqs/pip-missing-reqs to check for missing dependencies
59+ requirements-check :
60+ runs-on : ubuntu-latest
61+ steps :
62+ - name : Checkout repository
63+ uses : actions/checkout@v4
64+ - name : Set up Python
65+ uses : actions/setup-python@v4
66+ with :
67+ python-version : " 3.14"
68+
69+ - name : Install dependencies
70+ run : |
71+ python -m pip install --upgrade pip
72+ pip install pip-check-reqs
73+
74+ - name : Run pip-check-reqs/pip-missing-reqs
75+ run : |
76+ pip-missing-reqs .
77+
78+ # Use Prettier to check various file formats
79+ prettier :
80+ runs-on : ubuntu-latest
81+ steps :
82+ - name : Checkout repository
83+ uses : actions/checkout@v4
84+ - name : Setup node
85+ uses : actions/setup-node@v4
86+ with :
87+ node-version : " 20"
88+
89+ - name : Install Prettier
90+ run : npm install -g prettier
91+
92+ - name : Run Prettier --check
93+ run : prettier --check .
0 commit comments