Skip to content

Commit 1219730

Browse files
committed
feat(ci): run testsuite
1 parent 3ddac71 commit 1219730

2 files changed

Lines changed: 72 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,46 @@ 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: Tests, Python ${{ matrix.python-version }}, ${{ matrix.os }}
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+
activate-environment: 'true'
56+
- run: uv sync
57+
- run: pytest
58+
59+
2060
linux:
2161
runs-on: ${{ matrix.platform.runner }}
2262
strategy:
@@ -221,11 +261,24 @@ jobs:
221261
name: wheels-sdist
222262
path: dist
223263

264+
all-tests:
265+
needs:
266+
- test
267+
- linux
268+
- musllinux
269+
- windows
270+
- macos
271+
- sdist
272+
name: CI passed
273+
runs-on: ubuntu-slim
274+
steps:
275+
- run: echo
276+
224277
release:
225278
name: Release
226279
runs-on: ubuntu-latest
227280
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
228-
needs: [linux, musllinux, windows, macos, sdist]
281+
needs: all-tests
229282
permissions:
230283
# Use to sign the release artifacts
231284
id-token: write
@@ -254,7 +307,7 @@ jobs:
254307
name: Create release on GitHub
255308
permissions:
256309
contents: write
257-
needs: [linux, musllinux, windows, macos, sdist]
310+
needs: all-tests
258311
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
259312
steps:
260313
- 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)