diff options
author | Claudio André <claudioandre.br@gmail.com> | 2018-06-18 12:12:29 -0300 |
---|---|---|
committer | Claudio André <claudioandre.br@gmail.com> | 2018-06-21 13:29:08 -0300 |
commit | 8fb43047dfb4f74de1d9c107bfbae113b02bd63c (patch) | |
tree | 443b8aa2fbe925efa0f49c63f256651d2d5613c2 /.gitlab-ci.yml | |
parent | 316b901296e781f13ab85607117d1f83e1e0f999 (diff) | |
download | gnome-control-center-8fb43047dfb4f74de1d9c107bfbae113b02bd63c.tar.gz |
CI: add coverage parsing to the job
It works only if enabled via CI/CD Settings. More info available at
https://docs.gitlab.com/ee/user/project/pipelines/settings.html#test-coverage-parsing.
The parsing regex was tested on my GitLab forked project.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00452b2a8..f4fe41f01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,6 +83,8 @@ test: coverage: <<: *save_build_logs stage: test + variables: + coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/' script: - *environment_information @@ -96,6 +98,11 @@ coverage: - ninja -C _build test - ninja -C _build coverage-html + # Parse the report to get the coverage result + - | + echo == Coverage == + sed -e 's/<[^>]*>//g' _build/meson-logs/coveragereport/index.html | tr -d ' \t' | grep -A3 -P '^Lines:$' | tr '\n' ' '; echo + ## # Stage: Delivery # |