Skip to content

Commit 822dfb5

Browse files
committed
feat(ci): run testsuite
1 parent bee389d commit 822dfb5

2 files changed

Lines changed: 71 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,45 @@ permissions:
1717
contents: read
1818

1919
jobs:
20+
test:
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
matrix:
24+
os:
25+
- ubuntu-latest
26+
python-version:
27+
- '3.10'
28+
- '3.11'
29+
- '3.12'
30+
- '3.13'
31+
- '3.14'
32+
include:
33+
- os: windows-latest
34+
python-version: '3.14'
35+
- os: macos-latest
36+
python-version: '3.14'
37+
- os: ubuntu-24.04-arm
38+
python-version: '3.14'
39+
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}
40+
steps:
41+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
42+
with:
43+
persist-credentials: false
44+
- name: Set up Python ${{ matrix.python-version }}
45+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
46+
id: setup_python
47+
with:
48+
python-version: ${{ matrix.python-version }}
49+
- uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2 # zizmor: ignore[cache-poisoning]
50+
# The cache is stored only on main branch and not used for publishing
51+
with:
52+
save-cache: ${{ github.ref == 'refs/heads/main' }}
53+
cache-suffix: ${{ steps.setup_python.outputs.python-version }}
54+
version: 0.9.13
55+
- run: uv sync
56+
- run: pytest
57+
58+
2059
linux:
2160
runs-on: ${{ matrix.platform.runner }}
2261
strategy:
@@ -221,11 +260,24 @@ jobs:
221260
name: wheels-sdist
222261
path: dist
223262

263+
all-tests:
264+
needs:
265+
- test
266+
- linux
267+
- musllinux
268+
- windows
269+
- macos
270+
- sdist
271+
name: CI passed
272+
runs-on: ubuntu-slim
273+
steps:
274+
- run: echo
275+
224276
release:
225277
name: Release
226278
runs-on: ubuntu-latest
227279
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
228-
needs: [linux, musllinux, windows, macos, sdist]
280+
needs: all-tests
229281
permissions:
230282
# Use to sign the release artifacts
231283
id-token: write
@@ -254,7 +306,7 @@ jobs:
254306
name: Create release on GitHub
255307
permissions:
256308
contents: write
257-
needs: [linux, musllinux, windows, macos, sdist]
309+
needs: all-tests
258310
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
259311
steps:
260312
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0

pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
build-backend = "maturin"
33
requires = ["maturin>=1.10.0,<2.0"]
44

5+
[dependency-groups]
6+
build = [
7+
"maturin==1.10.2"
8+
]
9+
dev = [
10+
{include-group = "build"},
11+
{include-group = "test"},
12+
{include-group = "pre-commit"}
13+
]
14+
pre-commit = [
15+
"pre-commit==4.5.0"
16+
]
17+
test = [
18+
"pytest-github-actions-annotate-failures==0.3.0",
19+
"pytest==9.0.1"
20+
]
21+
522
[project]
623
classifiers = [
724
"Programming Language :: Rust",

0 commit comments

Comments
 (0)