Skip to content

Add publish and release workflows #9

Add publish and release workflows

Add publish and release workflows #9

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: build and test
strategy:
fail-fast: false
matrix:
rust_toolchain: ["stable"] # "nightly"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Rust in GH runner images can lag behind stable releases + act does not include Rust
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust_toolchain }}
- name: Install rust-cache
uses: Swatinem/rust-cache@v2
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install UV
uses: astral-sh/setup-uv@v3
with:
version: "0.5.0"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
Cargo.toml
- name: Install python deps + Build
run: |
uv pip install --system -e ".[test]" maturin --verbose
- name: Python Tests
run: pytest -n auto
- name: Rust Tests
run: cargo test