-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (71 loc) · 2.04 KB
/
Copy pathci.yml
File metadata and controls
71 lines (71 loc) · 2.04 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# .github/workflows/ci.yml
name: CI
permissions:
contents: read
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint-matrix:
name: Lint (${{ matrix.os }}, Python ${{ matrix.python-version }})
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install uv and Python
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Sync deps (frozen)
run: uv sync --frozen --all-extras --all-groups
- name: Use Hatch to build, lint, and typecheck
run: |
uv run hatch build
uv run hatch fmt --check
uv run hatch run typing:check
test-matrix:
name: Unit Tests (${{ matrix.os }}, Python ${{ matrix.python-version }})
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install uv and Python
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Sync deps (frozen)
run: uv sync --frozen --all-extras --all-groups
- name: Use Hatch to test
run: |
uv run hatch test -py ${{ matrix.python-version }}
lint:
name: Lint
if: always()
runs-on: ubuntu-latest
needs: [lint-matrix]
steps:
- name: Check Lint Matrix
if: ${{ needs.lint-matrix.result != 'success' }}
run: exit 1
test:
name: Unit Tests
if: always()
runs-on: ubuntu-latest
needs: [test-matrix]
steps:
- name: Check Unit Test Matrix
if: ${{ needs.test-matrix.result != 'success' }}
run: exit 1