Skip to content

lint corrections, doc corrections, workflow improvements and num-trai… #346

lint corrections, doc corrections, workflow improvements and num-trai…

lint corrections, doc corrections, workflow improvements and num-trai… #346

Workflow file for this run

name: coverage
env:
CARGO_TERM_COLOR: always
on:
push:
jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: llvm-tools-preview
default: true
- name: Install grcov
run: curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
- name: Generate code coverage
run: |
export RUSTFLAGS="-Cinstrument-coverage"
export RUSTDOCFLAGS="-Cinstrument-coverage -Zunstable-options --persist-doctests target/debug/doctestbins"
export LLVM_PROFILE_FILE="lattice_qcd_rs-%p-%m.profraw"
cargo +nightly test --verbose --all --no-default-features --features="serde-serialize"
cargo +nightly test --verbose --all --no-default-features --features="serde-serialize" --examples
- name: parse code coverage
run: ./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info
- name: Upload to codecov.io
run: bash <(curl -s https://codecov.io/bash) -f lcov.info