[tracker/wip/carlosg/more-tests: 7/9] ci: Build detailed HTML Coverage summary in artifacts




commit 20f54707694a27619e63bb0a868e1d2c209fe3d7
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Sep 28 18:44:36 2020 +0200

    ci: Build detailed HTML Coverage summary in artifacts
    
    Make the artifacts for the Coverage target contain a fully detailed
    HTML summary of the coverage status (including visualizing that info
    together with source code).
    
    This proves useful for knowing what is missing tests, so make it
    readily available for everyone.

 .gitlab-ci.yml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bddf55dca..7c6183f68 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -67,12 +67,16 @@ coverage-analysis:
   allow_failure: true
   script:
     - dnf install -y gcovr
-    - su tracker -c 'mkdir coverage-build'
+    - su tracker -c 'mkdir -p coverage-build/meson-build/coveragereport'
     - su tracker -c 'cd coverage-build; meson .. -Db_lto=true -Db_coverage=true'
     - su tracker -c 'cd coverage-build; ninja'
     - su tracker -c 'cd coverage-build; env LANG=C.UTF-8 LC_ALL=C.UTF-8 dbus-run-session eatmydata meson 
test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}'
-    - su tracker -c 'cd coverage-build; gcovr --root=.. --exclude=../docs/reference --exclude=../tests 
--exclude=../utils --exclude=../examples'
-  coverage: '/^TOTAL.*\s+(\d+\%)$/'
+    - su tracker -c 'cd coverage-build; gcovr --html-details --print-summary --root=.. 
--exclude=../docs/reference --exclude=../tests --exclude=../utils --exclude=../examples --output 
meson-build/coveragereport/index.html'
+  coverage: '/^lines:\s+(\d\.+\%) \(.*\)/'
+  artifacts:
+    when: always
+    paths:
+    - build/meson-logs
 
 coverity:
   stage: analysis


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]