[nautilus/gcovr-only-in-master] CI: Use gcovr only in master



commit 8b52829baf8bc8a085a2176faa31b2f5d43972a0
Author: Carlos Soriano <csoriano1618 gmail com>
Date:   Mon Oct 22 13:17:46 2018 +0000

    CI: Use gcovr only in master

 .gitlab-ci.yml | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2c8ce9d60..7aa6f8fae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,7 +13,7 @@ stages:
       - cd _build
       - ninja test
 
-.flatpak_template: &flatpak
+.flatpak_script_template: &flatpak_script
     script:
         - flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
         # Make sure to keep this in sync with the Flatpak manifest, all arguments
@@ -34,6 +34,8 @@ stages:
                   dbus-run-session meson test -C _build
         # Generate a Flatpak bundle
         - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}
+
+.gcovr_script_template: &gcovr_script
         # Generate coverage report
         - cd _build
         - flatpak build ../app gcovr
@@ -53,7 +55,19 @@ stages:
             --exclude=../src/nautilus-self-check-functions.c
             --exclude=../subprojects/libgd/
             --exclude=../test/
-    coverage: '/^branches:.*\s+(\S+\%).*$/'
+
+.flatpak_artifacts_template: &flatpak_artifacts
+    artifacts:
+        paths:
+            - ${BUNDLE}
+            - _build/meson-logs/
+        # 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.
+        when: always
+        expire_in: 2 days
+
+.flatpak_gcovr_artifacts_template: &flatpak_gcovr_artifacts
     artifacts:
         paths:
             - ${BUNDLE}
@@ -65,6 +79,16 @@ stages:
         when: always
         expire_in: 2 days
 
+.flatpak_template: &flatpak
+    <<: *flatpak_script
+    <<: *flatpak_artifacts
+
+.flatpak_gcovr_template: &flatpak_gcovr
+    <<: *flatpak_script
+    <<: *gcovr_script
+    coverage: '/^branches:.*\s+(\S+\%).*$/'
+    <<: *flatpak_gcovr_artifacts
+
 flatpak devel:
     image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.30
     stage: test
@@ -74,7 +98,7 @@ flatpak devel:
         FLATPAK_MODULE: "nautilus"
         RUNTIME_REPO: "https://sdk.gnome.org/gnome.flatpakrepo";
         DBUS_ID: "org.gnome.NautilusDevel"
-    <<: *flatpak
+    <<: *flatpak_gcovr
 
 review:
     stage: deploy


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