Skip to content

try llvm-cov

try llvm-cov #8

Workflow file for this run

name: Coverage
on:
push:
branches:
- master
- coverage
pull_request:
branches:
- master
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: llvm-tools-preview
toolchain: stable
#- name: Run tests
# env:
# CARGO_INCREMENTAL: "0"
# LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw"
# RUSTDOCFLAGS: "-Cinstrument-coverage"
# RUSTFLAGS: "-Cinstrument-coverage"
# run: cargo test issue
- name: Install llvm-cov
run: cargo install cargo-llvm-cov
- name: Generate coverage report
run: >
cargo llvm-cov --lcov --output-path coverage.lcov -- respect_max_allocations
#grcov target/coverage/ -s . --binary-path target/debug/ -t lcov --branch
#--ignore '/home/runner/work/rgb-lib/rgb-lib' --ignore '.' --ignore '../*' --ignore 'target/*' --ignore 'tests/*' --ignore-not-existing -o coverage.lcov
#run: grcov . --binary-path target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov
- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
file: coverage.lcov
flags: rust
token: ${{ secrets.CODECOV_TOKEN }}