[nautilus/testing-ci] CI: Make coverage in the Flatpak version



commit 303fac4aa21a5f4e726478426741926861bfd6a1
Author: Carlos Soriano <csoriano1618 gmail com>
Date:   Sun Mar 18 21:11:24 2018 +0000

    CI: Make coverage in the Flatpak version

 .gitlab-ci.yml | 46 +++++++++++++++++++++-------------------------
 1 file changed, 21 insertions(+), 25 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a4e3d6629..c2e1dc9b3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,15 +14,33 @@ stages:
 flatpak:master:
     image: flatpak/flatpak-builder:gnome-3-28
     stage: test
+    before_script:
+    # Waiting for gcovr 3.5 to be released.
+    - pip install git+https://github.com/gcovr/gcovr.git
     script:
     - flatpak-builder --stop-at=nautilus app build-aux/flatpak/org.gnome.NautilusDevel.json
-    - flatpak-builder --run app build-aux/flatpak/org.gnome.NautilusDevel.json meson --prefix=/app 
--libdir=/app/lib -Dprofile=development _build
+    - flatpak-builder --run app build-aux/flatpak/org.gnome.NautilusDevel.json meson --prefix=/app 
--libdir=/app/lib -Dprofile=development -Db_coverage=true _build
     - flatpak-builder --run app build-aux/flatpak/org.gnome.NautilusDevel.json ninja -C _build install
     - flatpak-builder --finish-only --repo=repo app build-aux/flatpak/org.gnome.NautilusDevel.json
     # Make a Flatpak Nautilus bundle for people to test
     - flatpak build-bundle repo nautilus-dev.flatpak org.gnome.NautilusDevel
     # Run automatic tests inside the Flatpak env
     - flatpak-builder --run app build-aux/flatpak/org.gnome.NautilusDevel.json ninja -C _build test
+    - cd _build
+    - 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+\%)$/'
     artifacts:
         paths:
           - nautilus-dev.flatpak
@@ -42,31 +60,9 @@ fedora:rawhide:
     image: fedora:rawhide
     stage: cross_distro
     script:
-    - dnf install -y 'dnf-command(builddep)' redhat-rpm-config gcovr
-    # Waiting for gcovr 3.5 to be released.
-    - pip install git+https://github.com/gcovr/gcovr.git
+    - dnf install -y 'dnf-command(builddep)' redhat-rpm-config
     - dnf builddep -y nautilus
-    - meson _build . -Db_coverage=true
-    # Coverage data contains paths relative to the build directory,
-    # so changing to it makes writing filter expressions easier.
-    #
-    # _build/src/ contains generated sources, so that is filtered out as well.
-    - 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


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