mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-28 14:31:06 +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:
|
script:
|
||||||
- cargo test --locked --color=always --all --all-features --exclude gst-plugin-gtk4
|
- cargo test --locked --color=always --all --all-features --exclude gst-plugin-gtk4
|
||||||
# generate html report
|
# generate html report
|
||||||
- grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*target*" --ignore "*/build.rs" -o ./coverage/
|
- mkdir -p coverage
|
||||||
# generate cobertura report for gitlab integration
|
- grcov . --binary-path ./target/debug/ -s . -t html,cobertura --branch --ignore-not-existing --ignore "*target*" --ignore "*/build.rs" -o ./coverage/
|
||||||
- grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "*target*" --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/html/index.html | head -1 || true
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- 'coverage'
|
- 'coverage'
|
||||||
reports:
|
reports:
|
||||||
coverage_report:
|
coverage_report:
|
||||||
coverage_format: cobertura
|
coverage_format: cobertura
|
||||||
path: coverage.xml
|
path: "coverage/cobertura.xml"
|
||||||
|
|
||||||
cerbero trigger:
|
cerbero trigger:
|
||||||
image: $CERBERO_TRIGGER_IMAGE
|
image: $CERBERO_TRIGGER_IMAGE
|
||||||
|
|
Loading…
Reference in a new issue