From 4920a85acde0b31264378e741de6ffd81d8c0133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Schr=C3=B6der?= <fschroeder@techfak.uni-bielefeld.de> Date: Thu, 29 Feb 2024 10:19:23 +0100 Subject: [PATCH] Update pytest and coverage commands in GitLab CI The pytest command in the GitLab CI configuration has been updated to also generate a coverage report. Additionally, the coverage reporting syntax has been altered to specifically target the Cobertura coverage format and specify the path for the coverage.xml file. --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 386fd0bd..418fb589 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,11 +5,13 @@ pytest: - apt-get install -y python3-dev python3-pip graphviz graphviz-dev - pip install pytest - pip install . - - pytest --cov=cooperative_cuisine + - pytest --cov --cov-report term --cov-report xml:coverage.xml + coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' artifacts: - when: always reports: - cobertura: coverage.xml + coverage_report: + coverage_format: cobertura + path: coverage.xml pages: script: -- GitLab