Skip to content

Commit 03825e3

Browse files
ahrzbclaude
andcommitted
ci: add GitHub Actions workflow
Runs on Ubuntu for push-to-master and PRs: installs a Rust toolchain (the package is a pyo3/maturin extension), uv sync --locked to build it and install locked deps, then ruff check, ruff format --check, and pytest. Rust and uv build caches keep it fast. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4076c29 commit 03825e3

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
concurrency:
9+
group: ci-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
# The package is a pyo3/maturin extension, so CI needs a Rust toolchain
19+
# to build it during `uv sync`.
20+
- name: Install Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Cache Rust build
24+
uses: Swatinem/rust-cache@v2
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
with:
29+
enable-cache: true
30+
31+
# Provisions Python 3.14 (per requires-python), builds the extension, and
32+
# installs locked deps.
33+
- name: Build extension + install deps
34+
run: uv sync --locked
35+
36+
- name: Ruff lint
37+
run: uv run ruff check .
38+
39+
- name: Ruff format
40+
run: uv run ruff format --check .
41+
42+
- name: Tests
43+
run: uv run pytest -q

0 commit comments

Comments
 (0)