-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (37 loc) · 1.4 KB
/
Copy pathpythonlint.yml
File metadata and controls
38 lines (37 loc) · 1.4 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
name: "Linting"
on:
push:
branches: [main]
pull_request: {}
jobs:
lint:
# the name must not depend on the commands below: repositories built from this template use it as a
# required status check in their branch ruleset, and GitHub would otherwise append the whole command
# string - so renaming the package, or any edit to a lint invocation, silently makes the required
# check unreportable and blocks every pull request
name: "Python Code Quality and Lint (${{ matrix.linter-env }})"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- linter-env: linting
commands: |
uv run ruff check src/mypackage unittests
- linter-env: type_check
commands: |
uv run mypy --show-error-codes src/mypackage --strict
uv run mypy --show-error-codes unittests --strict
- linter-env: spell_check
commands: |
uv run codespell --ignore-words=domain-specific-terms.txt src
uv run codespell --ignore-words=domain-specific-terms.txt README.md
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v10.1.0
with:
python-version: "3.14"
- name: Install Dependencies
run: uv sync --group ${{ matrix.linter-env }}
- name: Run ${{ matrix.linter-env }}
run: ${{ matrix.commands }}