diff options
author | Federico Mena Quintero <federico@gnome.org> | 2022-01-14 13:32:54 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2022-01-14 13:59:36 -0600 |
commit | 6428483406e6edd4c381f5193394ad77ab18b0ba (patch) | |
tree | 948e22e222abfea71269241b5a0c38d4d2d43936 /.gitlab-ci.yml | |
parent | e80ed996137fac5191add0197542e7be29e6f085 (diff) | |
download | librsvg-6428483406e6edd4c381f5193394ad77ab18b0ba.tar.gz |
Publish HTML test coverage
Generate HTML for human consumption, in addition to cobertura for
gitlab's consumption.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b83b6277..eb881c70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -123,7 +123,10 @@ coverage: script: - cargo +nightly test --no-fail-fast || true after_script: - - ./grcov . --binary-path ./target/debug/ -s . -t cobertura --branch --ignore-not-existing --ignore "*cargo*" -o coverage.xml + - ./grcov . --binary-path ./target/debug/ --source-dir . --output-type cobertura --llvm --branch --ignore-not-existing --ignore "*cargo*" -o coverage.xml + - ./grcov . --binary-path ./target/debug/ --source-dir . --output-type html --llvm --branch --ignore-not-existing --ignore "*cargo*" --output-path ./target/debug/coverage/ + - mkdir -p public/coverage + - cp -r target/debug/coverage/* public/coverage - grep -Eo 'line-rate="[^"]+"' coverage.xml | head -n 1 | grep -Eo '[0-9.]+' | awk '{ print "Coverage:", $1 * 100 }' coverage: '/Coverage: \d+\.\d+/' artifacts: @@ -131,6 +134,8 @@ coverage: expire_in: 2 days reports: cobertura: coverage.xml + paths: + - public cargo_bench: stage: unit test @@ -271,6 +276,7 @@ pages: extends: '.cache' needs: - job: reference + - job: coverage script: - mkdir -p public/internals - sudo -E cargo doc --document-private-items --no-deps |