-
Notifications
You must be signed in to change notification settings - Fork 776
48 lines (44 loc) · 1.19 KB
/
test.yaml
File metadata and controls
48 lines (44 loc) · 1.19 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
name: test
on:
push: # any branch
pull_request:
branches: [main]
env:
FORCE_COLOR: 1
jobs:
test-ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
steps:
- uses: actions/checkout@v6.0.2
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Code formatting
if: ${{ matrix.python-version == '3.14' }}
run: |
uv run ruff check .
uv run ruff format --check .
- name: Typos
if: ${{ matrix.python-version == '3.14' }}
run: |
uv run typos .
- name: Unit test
run: |
uv run coverage run -m pytest tests/
- name: Type Checking
run: |
uv run mypy --strict src/ --platform win32
uv run mypy --strict src/ --platform linux
uv run mypy --strict src/ --platform darwin
- name: Run codecov
run: |
uv run codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}