From: Mark Andrews Date: Thu, 23 Feb 2023 22:39:34 +0000 (+1100) Subject: Extract test coverage statistics from the gcov job X-Git-Tag: v9.19.11~7^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db7af9fcc1c91c3290982b555bdf1c55f6a73d66;p=thirdparty%2Fbind9.git Extract test coverage statistics from the gcov job In older GitLab versions, the regular expression used for extracting test coverage statistics from the output of GitLab CI jobs was configured in the project's settings, using GitLab's web interface. That changed in recent GitLab versions [1]; the previous configuration method was removed from the web interface altogether as of GitLab 15.0. The relevant regular expression is now supposed to be set in the relevant job's definition in .gitlab-ci.yml. Set the regular expression used for extracting test coverage statistics in the definition of the "gcov" GitLab CI job. Use the regular expression suggested in GitLab's documentation [2]. [1] https://docs.gitlab.com/ee/update/deprecations.html#test-coverage-project-cicd-setting [2] https://docs.gitlab.com/ee/ci/pipelines/settings.html#test-coverage-examples --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8007ccad9b2..cd93209157f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1553,6 +1553,7 @@ gcov: - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude-directories lib/samples --exclude tests --html-details -o coverage.html - gcovr --root . --exclude-directories bin/tests --exclude-directories doc --exclude-directories fuzz --exclude-directories lib/samples --exclude tests -o coverage.txt - tail -n 3 coverage.txt + coverage: /^TOTAL.*\s+(\d+\%)$/ artifacts: paths: - coverage*.html