-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (69 loc) · 1.97 KB
/
tests.yml
File metadata and controls
84 lines (69 loc) · 1.97 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
79
80
81
82
83
84
name: Tests
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
# Linux, Windows, MacOS
test-standard:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.12', '3.13', '3.14', '3.14t']
steps:
- uses: actions/checkout@v6
- name: Set up Rust
run: rustup update stable && rustup default stable
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies
run: pip install maturin pytest
- name: Build and install
shell: bash
run: |
maturin build --release
pip install target/wheels/*.whl
- name: Run tests
run: pytest tests
# Alpine Linux (Musl)
test-alpine:
name: Test (Alpine/Musl)
runs-on: ubuntu-latest
container:
image: python:3.13-alpine
steps:
- uses: actions/checkout@v6
- name: Install Alpine build deps
run: apk add --no-cache gcc musl-dev libffi-dev rust cargo openssl-dev git patchelf
- name: Install dependencies
run: pip install maturin pytest
- name: Build and install
run: |
maturin build --release
pip install target/wheels/*.whl
- name: Run tests
run: pytest tests
# FreeBSD
test-freebsd:
name: Test (FreeBSD)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Test in FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: pkg install -y rust python313 git
run: |
python3.13 -m venv venv
. venv/bin/activate
pip install maturin pytest
maturin build --release
pip install target/wheels/*.whl
pytest tests