ci: coverage: ignore build.rs when generating reports

This commit is contained in:
Guillaume Desmottes 2021-04-23 14:00:58 +02:00
parent c3946eef7c
commit f00c57cd6f

View file

@ -430,9 +430,9 @@ coverage:
script: script:
- *cargo_test - *cargo_test
# generate html report # generate html report
- grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*target*" --ignore "*/sys/*" --ignore "examples/*" --ignore "tutorials/*" -o ./coverage/ - grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*target*" --ignore "*/sys/*" --ignore "examples/*" --ignore "tutorials/*" --ignore "*/build.rs" -o ./coverage/
# generate cobertura report for gitlab integration # generate cobertura report for gitlab integration
- grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/sys/*" --ignore "examples/*" --ignore "tutorials/*" -o coverage.xml - grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/sys/*" --ignore "examples/*" --ignore "tutorials/*" --ignore "*/build.rs" -o coverage.xml
# output coverage summary for gitlab parsing. # output coverage summary for gitlab parsing.
# TODO: use grcov once https://github.com/mozilla/grcov/issues/556 is fixed # TODO: use grcov once https://github.com/mozilla/grcov/issues/556 is fixed
- grep % coverage/index.html | head -1 ; true - grep % coverage/index.html | head -1 ; true