-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.19 KB
/
Copy pathci.yml
File metadata and controls
50 lines (40 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
49
50
name: CI
on:
push:
jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
- name: Install dependencies
run: uv sync --extra dev
- name: Build
run: uv build
- name: Run tests
run: uv run pytest tests
- name: Verify version consistency
run: |
uv add PyYAML
uv run python - <<'PY'
import tomllib, yaml
with open("pyproject.toml", "rb") as f:
pkg_version = tomllib.load(f)["project"]["version"]
with open("vesskel/napari.yaml") as f:
manifest_version = yaml.safe_load(f)["version"]
if pkg_version != manifest_version:
raise SystemExit(
f"Version mismatch: pyproject.toml={pkg_version}, "
f"napari.yaml={manifest_version}"
)
print(f"Versions consistent: {pkg_version}")
PY