Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & Test (Rust + Python)
name: Python Tests

on:
push:
Expand All @@ -9,6 +9,7 @@ on:
- 'benchmarks/**'
- '.gitignore'
- 'LICENSE'
- '_rust/**'
branches: [main, master]
pull_request:
paths-ignore:
Expand All @@ -18,11 +19,12 @@ on:
- 'benchmarks/**'
- '.gitignore'
- 'LICENSE'
- '_rust/**'
branches: [main, master]
workflow_dispatch:

jobs:
build-test:
python-test:
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -77,10 +79,6 @@ jobs:
- name: Install maturin
run: uv pip install maturin

- name: Run Rust tests
working-directory: _rust
run: cargo test --release

- name: Build Rust extension
shell: bash
working-directory: _rust
Expand Down Expand Up @@ -136,8 +134,8 @@ jobs:
coverage-check:
name: Coverage Threshold Check
runs-on: ubuntu-latest
needs: build-test
if: needs.build-test.result == 'success'
needs: python-test
if: needs.python-test.result == 'success'

steps:
- name: Download coverage artifact
Expand Down Expand Up @@ -180,4 +178,4 @@ jobs:
sys.exit(1)
else:
print(f'SUCCESS: Coverage {coverage_percent:.2f}% meets threshold {threshold}%')
"
"
63 changes: 63 additions & 0 deletions .github/workflows/rust_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Rust Tests

on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
- 'examples/**'
- 'benchmarks/**'
- '.gitignore'
- 'LICENSE.txt'
- 'stratum/**'
- 'pyproject.toml'
- 'uv.lock'
branches: [main, master]
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- 'examples/**'
- 'benchmarks/**'
- '.gitignore'
- 'LICENSE.txt'
- 'stratum/**'
- 'pyproject.toml'
- 'uv.lock'
branches: [main, master]
workflow_dispatch:

jobs:
rust-test:
name: Rust Tests - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-14
- windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install OS specific dependencies
if: matrix.os == 'macos-14'
run: |
brew update
brew install libomp

- name: Cache Cargo build
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
_rust/target
key: ${{ runner.os }}-cargo-${{ hashFiles('_rust/Cargo.lock') }}

- name: Run Rust tests
working-directory: _rust
run: cargo test --release
Loading