Filter code coverage report results

This commit is contained in:
Steve Myers 2023-04-29 15:47:08 -05:00
parent 5be7c1c50d
commit c1cffe9333
No known key found for this signature in database
GPG Key ID: 8105A46B22C2D051

View File

@ -9,7 +9,7 @@ jobs:
env: env:
RUSTFLAGS: "-Cinstrument-coverage" RUSTFLAGS: "-Cinstrument-coverage"
RUSTDOCFLAGS: "-Cinstrument-coverage" RUSTDOCFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "report-%p-%m.profraw" LLVM_PROFILE_FILE: "./target/coverage/%p-%m.profraw"
steps: steps:
- name: Checkout - name: Checkout
@ -38,11 +38,13 @@ jobs:
- name: Install python dependencies - name: Install python dependencies
run: pip install hwi==2.1.1 protobuf==3.20.1 run: pip install hwi==2.1.1 protobuf==3.20.1
- name: Test - name: Test
run: (cd crates; cargo test --all-features) run: cargo test --all-features
- name: Make coverage directory
run: mkdir coverage
- name: Run grcov - name: Run grcov
run: mkdir coverage; grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '/*' -o ./coverage/lcov.info run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --keep-only '**/crates/**' --ignore '**/tests/**' --ignore '**/examples/**' -o ./coverage/lcov.info
- name: Generate HTML coverage report - name: Generate HTML coverage report
run: genhtml -o coverage-report.html ./coverage/lcov.info run: genhtml -o coverage-report.html --ignore-errors source ./coverage/lcov.info
- name: Coveralls upload - name: Coveralls upload
uses: coverallsapp/github-action@master uses: coverallsapp/github-action@master
with: with: