Skip to content

refactor(config): remove redundant InputClass::HMatrix #77

refactor(config): remove redundant InputClass::HMatrix

refactor(config): remove redundant InputClass::HMatrix #77

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
rust:
name: Rust checks (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: cargo test
run: cargo test --workspace --all-features
python:
name: Python bindings tests (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: Swatinem/rust-cache@v2
- name: Install package and test deps
run: |
python -m pip install --upgrade pip
pip install -e . pytest
- name: pytest
run: pytest tests/ -v
coverage:
name: Coverage (Rust + Python)
runs-on: ubuntu-latest
needs:
- rust
- python
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
- name: Install coverage deps
run: |
python -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
pip install maturin numpy scipy pytest
- name: Run coverage with Python bindings
run: |
. .venv/bin/activate
./scripts/coverage-with-python.sh