diff --git a/.gitlab-ci.common.yml b/.gitlab-ci.common.yml
index 7e91d0c6681103f9b50b06b8304bb5a9fec6108e..1d714e23dded1f3d0bebfe0aba64102bdab104c1 100644
--- a/.gitlab-ci.common.yml
+++ b/.gitlab-ci.common.yml
@@ -114,19 +114,26 @@ build-2204:
 .test:
   stage: test
   script:
-     - cd build/
-     - ctest -j`nproc` --output-on-failure -T test
+    - cd build/
+    - ctest -j`nproc` --output-on-failure -T test
 
 test-2004:
   extends: .test
   needs: ["versioning","build-2004"]
   image: $BASE_IMAGE_2004
   after_script:
-    - gcovr -j`nproc` -r .. -e '.*/external/.*' -e '.*/CompilerIdCXX/.*' -e '.*/test/.*'
+    - gcovr -j`nproc` -e 'external/.*' -e '.*/CompilerIdCXX/.*' -e '.*/test/.*' build/
 
 test-2204:
   extends: .test
   needs: ["versioning","build-2204"]
   image: $BASE_IMAGE_2204
   after_script:
-    - gcovr -j`nproc` -r .. -e '.*/external/.*' -e '.*/CompilerIdCXX/.*' -e '.*/test/.*'
+    - mkdir coverage
+    - gcovr -j`nproc` -e 'external/.*' -e '.*/CompilerIdCXX/.*' -e '.*/test/.*' --xml coverage.xml --html-details coverage/coverage.html build/
+    - tar cfz coverage.tar.gz coverage/
+  artifacts:
+    paths:
+      - coverage.tar.gz
+    reports:
+      cobertura: coverage.xml
\ No newline at end of file
diff --git a/docker/ubuntu_22_04_base b/docker/ubuntu_22_04_base
index 890b979ee837e25a881a1c26f50ddaf606e53778..0b6b81b4c6001209e08929b2972a5f259a6eae2b 100644
--- a/docker/ubuntu_22_04_base
+++ b/docker/ubuntu_22_04_base
@@ -9,8 +9,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade -
     wget git make cmake g++ doxygen \
 # install dependencies
     libboost-all-dev libhdf5-dev libpython3-dev python3-pip \
-    casacore-dev casacore-tools clang-format-12 \
+    casacore-dev casacore-tools clang-format-12 gcovr \
 # The formatter needs a binary named 'clang-format', not 'clang-format-12'.
 # Same for clang-tidy-12.
     && ln -sf clang-format-12 /usr/bin/clang-format \
-    && python3 -m pip install gcovr==5.0 cmake-format
\ No newline at end of file
+    && python3 -m pip install cmake-format
\ No newline at end of file