-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (61 loc) · 1.8 KB
/
Copy pathtest-python.yml
File metadata and controls
78 lines (61 loc) · 1.8 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
74
75
76
77
78
name: Python
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Use ruff-action so we get annotations in the GitHub UI.
- uses: astral-sh/ruff-action@v3
# The default step above runs `ruff check`; also enforce formatting.
- uses: astral-sh/ruff-action@v3
with:
args: "format --check"
docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
# The docs build relies only on the `.pyi` type stubs (allow_inspection:
# false), so we don't need to compile the Rust extension.
- name: Install docs dependencies
run: uv sync --no-install-package zarrista --group docs
# Ensure docs build without warnings.
- name: Build docs (strict)
run: uv run --no-project mkdocs build --strict
pytest:
name: Pytest
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: uv sync
run: uv sync --no-install-package zarrista
- name: maturin develop
run: uv run --no-project maturin develop
- name: Run pytest
run: uv run --no-project pytest --verbose