-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (61 loc) · 1.9 KB
/
Copy pathci.yml
File metadata and controls
73 lines (61 loc) · 1.9 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
72
73
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
# M1 acceptance criterion 7: green on Linux, macOS and Windows.
# Full Python matrix on Linux; one version elsewhere keeps the run cheap
# while still catching path and encoding differences.
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, python: "3.11" }
- { os: ubuntu-latest, python: "3.12" }
- { os: ubuntu-latest, python: "3.13" }
- { os: macos-latest, python: "3.12" }
- { os: windows-latest, python: "3.12" }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
enable-cache: true
- name: Set up Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Install project
run: uv sync --extra dev --python ${{ matrix.python }}
- name: Lint
run: uv run ruff check .
- name: Test
run: uv run pytest
# The dimensional test is the point of the whole suite (§ 13.2), so it also
# runs on its own: if it ever gets skipped or silently removed, this job goes
# red instead of the suite quietly passing without it.
dimensional:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v9.0.0
with:
enable-cache: true
- run: uv sync --extra dev
- name: Dimensional accuracy
run: uv run pytest tests/test_dimensional.py -v
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v9.0.0
- name: Build wheel and sdist
run: uv build
- uses: actions/upload-artifact@v7
with:
name: dist
path: dist/