-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (68 loc) · 2.49 KB
/
Copy pathtest.yml
File metadata and controls
82 lines (68 loc) · 2.49 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
name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
# ── Python test matrix ─────────────────────────────────────────
# Builds the unified GenAIRR wheel via maturin (Rust kernel as the
# private GenAIRR._engine submodule + Python wrappers in one wheel)
# and runs the pytest suite. abi3-py39 means one wheel covers every
# Python version we test.
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
engine_rs/target
key: ${{ runner.os }}-cargo-${{ hashFiles('engine_rs/Cargo.toml', 'engine_rs/Cargo.lock') }}
- name: Install maturin + test deps
run: |
python -m pip install --upgrade pip
pip install "maturin>=1.5,<2.0" pytest pandas
- name: Build & install GenAIRR wheel
run: maturin build --release --out dist
- name: Install built wheel
shell: bash
run: pip install dist/genairr-*.whl
- name: Run pytest
run: pytest tests/ -x -q
# ── Rust unit + integration tests ──────────────────────────────
# Direct `cargo test` against the engine crate. Cheaper and more
# focused than running the whole pytest suite to validate the
# kernel.
cargo_test:
name: cargo test (engine_rs)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
engine_rs/target
key: ${{ runner.os }}-cargo-${{ hashFiles('engine_rs/Cargo.toml', 'engine_rs/Cargo.lock') }}
- name: cargo test
working-directory: engine_rs
run: cargo test --all-features