Skip to content

Commit 4774953

Browse files
committed
ci: Fix code coverage test
1 parent 773ca92 commit 4774953

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/ci.yaml

+5-6
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,20 @@ jobs:
4646
name: Tests and Coverage Report
4747
env:
4848
CARGO_INCREMENTAL: 0
49-
RUSTFLAGS: -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
49+
RUSTFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
5050
RUSTDOCFLAGS: -Cpanic=abort
51+
LLVM_PROFILE_FILE: yang_rs-%p-%m.profraw
5152
runs-on: ubuntu-latest
5253
steps:
5354
- uses: actions/checkout@v4
54-
- uses: actions-rs/toolchain@v1
55+
- uses: dtolnay/rust-toolchain@nightly
5556
with:
56-
profile: minimal
57-
toolchain: nightly
58-
override: true
57+
components: llvm-tools-preview
5958
- name: Generate test result and coverage report
6059
run: |
6160
cargo install cargo2junit grcov;
6261
cargo test --features bundled $CARGO_OPTIONS -- -Z unstable-options --format json | cargo2junit > results.xml;
63-
grcov . -s . -t lcov --llvm --ignore-not-existing --ignore "/*" --ignore "tests/*" --ignore "examples/*" --ignore "libyang2-sys/*" -o lcov.info;
62+
grcov . -s . --binary-path ./target/debug/ -t lcov --llvm --ignore-not-existing --ignore "/*" --ignore "tests/*" --ignore "examples/*" --ignore "libyang3-sys/*" -o lcov.info;
6463
- name: Upload test results
6564
uses: EnricoMi/publish-unit-test-result-action@v1
6665
with:

0 commit comments

Comments
 (0)