-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (44 loc) · 1.15 KB
/
code-quality.yml
File metadata and controls
46 lines (44 loc) · 1.15 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
name: Static code quality tests and unit tests
on:
push:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- '.github/workflows/code-quality.yml'
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- '.github/workflows/code-quality.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11", "3.12", "3.13", "3.14" ]
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install Python dependencies
run: uv sync --dev --all-extras
- name: Code linting
run: uv run ruff check src tests
- name: Code formatting
run: uv run ruff format --check src tests
- name: Static type checking
run: |
uv run mypy src
uv run mypy tests
- name: Unit tests
run: uv run pytest tests