-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (43 loc) · 1.41 KB
/
Copy pathpythonlint.yml
File metadata and controls
44 lines (43 loc) · 1.41 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
name: "Linting"
on:
push:
branches: [main]
pull_request: {}
jobs:
pylint:
name: Python Code Quality and Lint
runs-on: ubuntu-latest
strategy:
matrix:
linter-env: ["linting", "type_check", "spell_check"]
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.2.0
with:
python-version: "3.14"
- name: Install Dependencies
run: |
if [ "${{ matrix.linter-env }}" = "spell_check" ]; then
uv sync --group spell_check
elif [ "${{ matrix.linter-env }}" = "linting" ]; then
uv sync --group lint --extra sqlmodels --extra ahbicht --extra cli
else
uv sync --group ${{ matrix.linter-env }} --extra sqlmodels --extra ahbicht --extra cli
fi
- name: Run ${{ matrix.linter-env }}
run: |
case "${{ matrix.linter-env }}" in
linting)
uv run ruff check src/fundamend
uv run ruff check unittests
;;
type_check)
uv run mypy --show-error-codes src/fundamend --strict
uv run mypy --show-error-codes unittests --strict
;;
spell_check)
uv run codespell --ignore-words=domain-specific-terms.txt src
uv run codespell --ignore-words=domain-specific-terms.txt README.md
;;
esac