Skip to content

Commit

Permalink
ci: Enable MC/DC coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Dec 11, 2024
1 parent 36b67a3 commit 421c9c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
OPTIONS+=("$BUILD_TYPE")
fi
if [ "${{ matrix.rust-toolchain }}" == "stable" ] && [ "${{ matrix.type }}" == "debug" ] && [ "${{endsWith(matrix.os, '-latest') && 'latest' || '' }}" == "latest" ]; then
cargo +${{ matrix.rust-toolchain }} llvm-cov test "${OPTIONS[@]}" --lcov --output-path lcov.info
cargo +${{ matrix.rust-toolchain }} llvm-cov test --mcdc "${OPTIONS[@]}" --lcov --output-path lcov.info
else
if [ "${{ startsWith(matrix.os, 'windows') && 'windows' || '' }}" == "windows" ]; then
# The codegen_windows_bindings test only succeeds when run via llvm-cov?!
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
cargo install cargo-llvm-cov --locked
cargo check --all-targets
cargo clippy
cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info
cargo llvm-cov test --mcdc --no-fail-fast --lcov --output-path lcov.info
cargo test --no-fail-fast --release
- if: matrix.os == 'openbsd'
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
cargo test --no-fail-fast
# FIXME: error[E0463]: can't find crate for `profiler_builtins`,
# so don't fail the workflow when that happens.
cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info || true
cargo llvm-cov test --mcdc --no-fail-fast --lcov --output-path lcov.info || true
cargo test --no-fail-fast --release
- if: matrix.os == 'solaris'
Expand All @@ -326,12 +326,12 @@ jobs:
cargo install cargo-llvm-cov --locked
cargo check --all-targets
cargo clippy
cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info
cargo llvm-cov test --mcdc --no-fail-fast --lcov --output-path lcov.info
cargo test --no-fail-fast --release
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
file: lcov.info
files: lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
Expand Down

0 comments on commit 421c9c0

Please sign in to comment.