From 27b5f1aa09dc68da22ec162f96e7c4dfd421914a Mon Sep 17 00:00:00 2001
From: Fadi Imani <fadi.imani.etu@univ-lille.fr>
Date: Tue, 2 Apr 2024 04:28:40 +0200
Subject: [PATCH] big project

---
 .gitlab-ci.yml | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b1fcbf8..b2ad226 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -54,13 +54,26 @@ test:
 #      when: always
 
 coverage:
-    stage: coverage
-    script:
-        - lcov -d build/CMakeFiles/ExampleTests.dir -c -o coverage.info
-        - lcov -r coverage.info */build/* */tests/* */c++/* -o coverageFiltered.info
-        - lcov --list coverageFiltered.info
-    coverage: '/Total:\|\s*([0-9.]+%)\s.*$/'
-    artifacts:
-      paths:
-        - ./build/CMakeFiles/ExampleTests.dir/coverageFiltered.info
-      when: always
\ No newline at end of file
+#    stage: coverage
+##    script:
+##        - lcov -d build/CMakeFiles/ExampleTests.dir -c -o coverage.info
+##        - lcov -r coverage.info */build/* */tests/* */c++/* -o coverageFiltered.info
+##        - lcov --list coverageFiltered.info
+##    coverage: '/Total:\|\s*([0-9.]+%)\s.*$/'
+##    artifacts:
+##      paths:
+##        - ./build/CMakeFiles/ExampleTests.dir/coverageFiltered.info
+##      when: always
+  stage: coverage
+  script:
+    - gcov -f -b build/*
+    - lcov --directory build --base-directory .  -c -o cov.info
+    - mkdir report1
+    - genhtml cov.info -o report
+  coverage: '/^\s*lines\S*\s*(\d+(?:\.\d+)?%)\s*/'
+  when: on_success
+  dependencies:
+    - job:test
+  artifacts:
+    paths:
+      - report/
-- 
GitLab