Skip to content

2025-02-04 Update

2025-02-04 Update #19

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
coverage:
name: Coverage for ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install uv
uses: astral-sh/setup-uv@v5
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
with:
key: coverage-cargo-${{ matrix.os }}
continue-on-error: true
- name: Setup virtual environment
run: |
uv sync
- name: Run coverage
run: |
source <(cargo llvm-cov show-env --export-prefix)
export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR
export CARGO_INCREMENTAL=1
cargo llvm-cov clean --workspace
cargo test
uv run -- maturin develop
uv run -- pytest tests --cov=foobar --cov-report xml
cargo llvm-cov report --lcov --output-path coverage.lcov
- uses: codecov/codecov-action@v5
with:
files: coverage.lcov,coverage.xml
name: ${{ matrix.os }}