diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f7e7d36c355e5546f527092d59795893ec168782..da0e9d6812326321071126ef625ea00537560f87 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -54,13 +54,13 @@ test:
 #      when: always
 
 coverage:
-  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*/'
-  artifacts:
-    paths:
-      - report/
+    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