summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2020-07-07 11:43:18 +0200
committerCarlos Garnacho <carlosg@gnome.org>2020-07-07 11:59:40 +0200
commit52caca9a46a224d1ce2a77c7735c19fd623854e7 (patch)
treeab9b07ccd8acaf7dc370568a547418fc14a57369 /.gitlab-ci.yml
parentfad8f59ecfd4853e1a2a0848858d706ef59300ad (diff)
downloadtracker-52caca9a46a224d1ce2a77c7735c19fd623854e7.tar.gz
ci: Add coverage analysis
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 960cf1743..8f3634c38 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -61,6 +61,19 @@ test-ubuntu-rolling:
image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/ubuntu:rolling
<<: *test
+coverage-analysis:
+ stage: analysis
+ image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
+ allow_failure: true
+ script:
+ - dnf install -y gcovr
+ - su tracker -c 'mkdir coverage-build'
+ - 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=../tests --exclude=../utils --exclude=../examples'
+ coverage: '/^TOTAL.*\s+(\d+\%)$/'
+
coverity:
stage: analysis
image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest