-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(issue-28): Introduce code coverage
Add script for local coverage checking and extended tests job in ci to produce code coverage and publish to codecov.
- Loading branch information
1 parent
9067a5f
commit 873d100
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ target | |
.secrets | ||
.test_data | ||
.run | ||
logs | ||
logs | ||
**/*.profraw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
export RUSTFLAGS="-Cinstrument-coverage" | ||
export LLVM_PROFILE_FILE="cargo-tests-%p-%m.profraw" | ||
cargo test --workspace | ||
mkdir -p target/coverage | ||
grcov . --binary-path ./target/debug/deps/ \ | ||
--source-dir . \ | ||
--output-types lcov,html,markdown,cobertura \ | ||
--branch \ | ||
--ignore-not-existing \ | ||
--ignore **/tests.rs \ | ||
--ignore "/*" \ | ||
--output-path target/coverage | ||
find . -name '*.profraw' -type f -delete |