summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio André <claudioandre.br@gmail.com>2018-06-17 19:13:39 -0300
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2018-06-21 15:34:59 +0000
commita1d57165c1a5de9aa409aad55bfe0ac05fd59fd7 (patch)
tree83c8a0b17249a6992819b558347b281d223b4f58
parenta5eccee8fd6471031ee024f94df56ada97b617bf (diff)
downloadgnome-control-center-a1d57165c1a5de9aa409aad55bfe0ac05fd59fd7.tar.gz
CI: add code coverage report
-rw-r--r--.gitlab-ci.yml46
1 files changed, 46 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e908f2944..7a4db76f7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -66,6 +66,52 @@ test:
fi
##
+# Stage: Test
+#
+# Runs the coverage test.
+##
+coverage:
+ stage: test
+ artifacts:
+ name: log
+ when: always
+ paths:
+ - $(pwd)/*.log
+ - _build/meson-logs/*
+ - _build/meson-logs/coveragereport
+
+ script:
+ - echo "== Info =="
+ - build-aux/ci/ci-helper.sh "INFO"
+ - build-aux/ci/ci-helper.sh "GIT_INFO"
+
+ - echo "== Building =="
+ - rm -rf _build/
+ - meson . _build -Db_coverage=true
+ - ninja -C _build 2>&1 | tee compilation.log
+
+ - echo "== Testing =="
+ - ninja -C _build test
+ - ninja -C _build coverage-html
+
+##
+# Stage: Delivery
+#
+# Publish the Coverage Report generated above
+##
+pages:
+ stage: delivery
+ dependencies:
+ - coverage
+ script:
+ - mv _build/meson-logs/coveragereport/ public/
+ artifacts:
+ paths:
+ - public
+ only:
+ - master@GNOME/gnome-control-center
+
+##
# Stage: Delivery
#
# Create a flatpak