[librsvg: 1/2] (#628): Implement cobertura report
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/2] (#628): Implement cobertura report
- Date: Fri, 14 Jan 2022 01:35:42 +0000 (UTC)
commit 18ed3779f3e55a8a760cd339f6aa836c025286ea
Author: Dunja Lalic <dunja lalic gmail com>
Date: Mon May 31 19:12:17 2021 +0200
(#628): Implement cobertura report
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/564>
.gitlab-ci.yml | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fc65acd14..b83b6277d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -117,13 +117,20 @@ coverage:
RUSTDOCFLAGS: "-Zinstrument-coverage"
LLVM_PROFILE_FILE: "coverage-%p-%m.profraw"
before_script:
- - apt update -yqq && apt install -yqq --no-install-recommends libgdk-pixbuf2.0-dev libpango1.0-dev
libcairo2-dev lcov
+ - apt update && apt install -y --no-install-recommends libgdk-pixbuf2.0-dev libpango1.0-dev libcairo2-dev
- rustup component add llvm-tools-preview
- curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-linux-x86_64.tar.bz2 | tar jxf
-
script:
- cargo +nightly test --no-fail-fast || true
- - ./grcov . --binary-path ./target/debug/ --source-dir . --output-type lcov --llvm --ignore-not-existing
--ignore "*cargo*" --output-path lcov.info
- - lcov --summary lcov.info
+ after_script:
+ - ./grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore
"*cargo*" -o coverage.xml
+ - grep -Eo 'line-rate="[^"]+"' coverage.xml | head -n 1 | grep -Eo '[0-9.]+' | awk '{ print "Coverage:",
$1 * 100 }'
+ coverage: '/Coverage: \d+\.\d+/'
+ artifacts:
+ name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
+ expire_in: 2 days
+ reports:
+ cobertura: coverage.xml
cargo_bench:
stage: unit test
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]