mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 04:51:26 +00:00
ci: Generate html and cobertura coverage with a single command
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1709>
This commit is contained in:
parent
bc930122ba
commit
3e97fef6ce
1 changed files with 4 additions and 5 deletions
|
@ -379,19 +379,18 @@ coverage:
|
|||
script:
|
||||
- cargo test --locked --color=always --all --all-features --exclude gst-plugin-gtk4
|
||||
# generate html report
|
||||
- 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
|
||||
- grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/build.rs" -o coverage.xml
|
||||
- mkdir -p coverage
|
||||
- grcov . --binary-path ./target/debug/ -s . -t html,cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/build.rs" -o ./coverage/
|
||||
# output coverage summary for gitlab parsing.
|
||||
# TODO: use grcov once https://github.com/mozilla/grcov/issues/556 is fixed
|
||||
- grep "%" coverage/index.html | head -1 || true
|
||||
- grep "%" coverage/html/index.html | head -1 || true
|
||||
artifacts:
|
||||
paths:
|
||||
- 'coverage'
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: coverage.xml
|
||||
path: "coverage/cobertura.xml"
|
||||
|
||||
cerbero trigger:
|
||||
image: $CERBERO_TRIGGER_IMAGE
|
||||
|
|
Loading…
Reference in a new issue