summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano1618@gmail.com>2018-10-09 13:47:32 +0000
committerCarlos Soriano <csoriano@redhat.com>2018-10-12 10:01:34 +0200
commite1a72e773642abb326b7b5ff8bb890b0dd50f1ff (patch)
treeabd957fcfe0eaed2fdee077769643e475f449659
parentd67d77c3d70045a5098ee3ad295eb12a7d16ef73 (diff)
downloadnautilus-e1a72e773642abb326b7b5ff8bb890b0dd50f1ff.tar.gz
CI: Generate coverage
And show it in GitLab Pages. This will help us to keep an eye on the status of testing. The report can still be improved though.
-rw-r--r--.gitlab-ci.yml59
1 files changed, 37 insertions, 22 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 878db320b..b5c79aac3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,10 +34,31 @@ stages:
dbus-run-session meson test -C _build
# Generate a Flatpak bundle
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}
+ # Generate coverage report
+ - cd _build
+ - flatpak build ../app gcovr
+ --html-details
+ -o coverage.html
+ --print-summary
+ --root=.
+ --exclude=src/
+ --exclude=../data/
+ --exclude=../eel/check-program.c
+ --exclude=../eel/eel-debug.c
+ --exclude=../eel/eel-lib-self-check-functions.c
+ --exclude=../eel/eel-self-checks.c
+ --exclude=../src/animation/
+ --exclude=../src/gtk/
+ --exclude=../src/nautilus-lib-self-check-functions.c
+ --exclude=../src/nautilus-self-check-functions.c
+ --exclude=../subprojects/libgd/
+ --exclude=../test/
+ coverage: '/^branches:.*\s+(\S+\%).*$/'
artifacts:
paths:
- ${BUNDLE}
- _build/meson-logs/
+ - _build/coverage.html
# The Flatpak bundle is always generated at the end, meaning that there
# won’t be one in case of failure, but the logs will be available for
# our expert investigators to dissect.
@@ -49,7 +70,7 @@ flatpak devel:
stage: test
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Nautilus.yml"
- MESON_ARGS: "-Dprofile=Devel -Dtests=all"
+ MESON_ARGS: "-Dprofile=Devel -Dtests=all -Db_coverage=true"
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://sdk.gnome.org/gnome.flatpakrepo"
DBUS_ID: "org.gnome.NautilusDevel"
@@ -92,25 +113,7 @@ fedora rawhide:
- dnf update -y --nogpgcheck
- dnf install -y 'dnf-command(builddep)' redhat-rpm-config libseccomp-devel gcovr --nogpgcheck
- dnf builddep -y nautilus --nogpgcheck
- script:
- - meson _build . -Db_coverage=true
- - cd _build
- - ninja test
- - gcovr --root=.
- --exclude=src/
- --exclude=../data/
- --exclude=../eel/check-program.c
- --exclude=../eel/eel-debug.c
- --exclude=../eel/eel-lib-self-check-functions.c
- --exclude=../eel/eel-self-checks.c
- --exclude=../src/animation/
- --exclude=../src/gtk/
- --exclude=../src/nautilus-lib-self-check-functions.c
- --exclude=../src/nautilus-self-check-functions.c
- --exclude=../subprojects/libgd/
- --exclude=../test/
- coverage: '/^TOTAL.*\s+(\d+\%)$/'
-
+ <<: *distro_test
only:
- schedules
- web
@@ -180,7 +183,7 @@ flatpak master:
stage: cross_environment
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.NautilusMaster.yml"
- MESON_ARGS: "-Dprofile=Master -Dtests=all"
+ MESON_ARGS: "-Dprofile=Master -Dtests=all -Db_coverage=true"
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
DBUS_ID: "org.gnome.NautilusMaster"
@@ -195,7 +198,7 @@ flatpak gtk4:
stage: cross_environment
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.NautilusGtk4.yml"
- MESON_ARGS: "-Dprofile=Gtk4 -Dtests=all"
+ MESON_ARGS: "-Dprofile=Gtk4 -Dtests=all -Db_coverage=true"
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
DBUS_ID: "org.gnome.NautilusGtk4"
@@ -204,3 +207,15 @@ flatpak gtk4:
- schedules
- web
- tags
+
+pages:
+ stage: deploy
+ script:
+ - mkdir public
+ - cd nautilus
+ - mv _build/coverage.html ${CI_PROJECT_DIR}/public/coverage/index.html
+ artifacts:
+ paths:
+ - public
+ only:
+ - master