---
name: Tests
"on":
- push
- pull_request
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
rust-tests:
name: Rust Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [stable]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
- name: Install Python (for PyO3)
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pyright
- name: Check Rust formatting
run: cargo fmt --all -- --check
- name: Build
run: cargo build --verbose
- name: Run Rust tests
run: cargo test --verbose
env:
RUST_TEST_THREADS: 2
pythontests:
name: Python Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U ".[migrate]"
- name: Style checks
run: |
python -m pip install ruff
python -m ruff check .
python -m ruff format --check .
- name: Typing checks
run: |
python -m pip install -U mypy
python -m mypy dissolve
- name: Test suite run
run: |
python -m pip install tox
tox
env:
PYTHONHASHSEED: random