mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +00:00
ci: coverage: generate cobertura report with grcov
It's supported with the latest version. Also ignore build.rs when generating reports. The new gitlab summary parsing regexp is now: <abbr .*>(\d+.\d+) %<\/abbr>
This commit is contained in:
parent
e9a08214bb
commit
40765f7c53
1 changed files with 5 additions and 6 deletions
|
@ -230,13 +230,12 @@ coverage:
|
||||||
script:
|
script:
|
||||||
- cargo test --locked --color=always --all-features
|
- cargo test --locked --color=always --all-features
|
||||||
# generate html report
|
# generate html report
|
||||||
- grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*target*" -o ./coverage/
|
- grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*target*" --ignore "*/build.rs" -o ./coverage/
|
||||||
# generate cobertura report for gitlab integration
|
# generate cobertura report for gitlab integration
|
||||||
- grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "*target*" -o lcov
|
- grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/build.rs" -o coverage.xml
|
||||||
- python3 /usr/local/lib/python3.7/dist-packages/lcov_cobertura.py lcov
|
# 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
|
||||||
- lcov -r lcov "/*" 2&> out
|
- grep "%" coverage/index.html | head -1 || true
|
||||||
- grep lines out
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- 'coverage'
|
- 'coverage'
|
||||||
|
|
Loading…
Reference in a new issue