Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #99

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #99

Workflow file for this run

name: Coverage
on:
push:
branches:
- main
pull_request:
jobs:
coverage:
name: Coverage
strategy:
matrix:
os: ["ubuntu"]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- 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@v1
with:
key: coverage-cargo-${{ matrix.os }}
continue-on-error: true
- name: Setup virtual environment
run: |
python3 -m venv venv
source venv/bin/activate
pip install .[dev]
- name: Run coverage
run: |
source venv/bin/activate
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
maturin develop
pytest tests --cov=src-py --cov-report xml
cargo llvm-cov --no-run --lcov --output-path coverage.lcov
- uses: codecov/codecov-action@v3
with:
files: coverage.lcov,coverage.xml
flags: rust-llvm-cov,pytest
name: ${{ matrix.os }}