From 338e4e7710f3da58403837caa8bf41f82ae12076 Mon Sep 17 00:00:00 2001
From: Oscar Gustafsson <oscar.gustafsson@gmail.com>
Date: Thu, 19 Jan 2023 09:31:19 +0100
Subject: [PATCH] Add code coverage to PRs

---
 .gitlab-ci.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ce19f75c..5a7ba5ab 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,7 @@ before_script:
   - python -m pip install --upgrade pip
   - python --version
   - pip install pytest pytest-cov sphinx furo numpydoc pytest-xvfb pytest-qt setuptools_scm sphinx-qt-documentation pytest-xdist
+  - export CPPFLAGS='--coverage'
   - pip install .
   - pip show b_asic
 
@@ -21,6 +22,8 @@ before_script:
         coverage_report:
           coverage_format: cobertura
           path: cov.xml
+  coverage: /(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/
+
 
 run-test-3.8:
   image: python:3.8
-- 
GitLab