Arrays don't seem to be supported according to the documentation, but you can use a glob pattern.

artifacts:
  reports:
    cobertura: "**/build/cobertura.xml"
Answer from sytech on Stack Overflow
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Multiple code coverage reports from one job - GitLab CI/CD - GitLab Forum
August 9, 2021 - I have a monorepo with several packages. Unit-tests and coverage are run separately for each of packages, but within one CI job. In the end I export multiple cobertura XML files from my job: artifacts: reports: cobertura: 'packages/{package1,package2}/coverage/cobertura-coverage.xml' But then ...
🌐
Stack Overflow
stackoverflow.com › questions › 77954640 › multiple-coverage-reports-and-badges-for-gitlab-tests
Multiple coverage reports and badges for GitLab Tests - Stack Overflow
The .gitlab-ci.yml looks something like this: Copytest_c: stage: test coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' script: - ./test_script_c.sh artifacts: reports: coverage_report: coverage_format: cobertura path: build/tests/c/CoberturaCoverageScripts.xml test_python: stage: test coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' script: - ./test_script_python.sh artifacts: reports: coverage_report: coverage_format: cobertura path: build/tests/python/CoberturaCoverageScripts.xml test_java: stage: test coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' script: - ./test_script_java.sh artifacts: reports: coverage_report: coverage_format: cobertura path: build/tests/java/CoberturaCoverageScripts.xml
Discussions

Test coverage report in MR merged from different jobs
Hello! In the doc https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualization.html it’s said You can specify one or more coverage reports to collect, including wildcard paths. GitLab then takes the coverage information in all the files and combines it together. More on forum.gitlab.com
🌐 forum.gitlab.com
5
0
September 24, 2021
Combined coverage for a repository
Combined test coverage for a repository (not in the context of an MR) I am aware of a feature in an MR which marks combined code coverage https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualizatio… More on forum.gitlab.com
🌐 forum.gitlab.com
0
0
June 28, 2021
Enabling cobertura
Following the docs, I’ve enabled the flag in the console: Feature.all.map {|f| [f.name, f.state]} => [["multiple_merge_request_assignees", :on], ["coverage_report_view", :on]] Looking at the job logs I have confirmed that the report xml is generated, and that it’s also specified in the ... More on forum.gitlab.com
🌐 forum.gitlab.com
18
0
April 28, 2020
Pipeline Cobertura coverage reports - clarification - GitLab CI/CD - GitLab Forum
self-hosted Omnilbus Docker 13.12.3 ... but I think I might know why…) that, per the page at how-test-coverage-visualization-works, multiple Cobertura formatted XML reports can be uploaded as is, and that Gitlab will properly aggregate them for display in the MR diffs ... More on forum.gitlab.com
🌐 forum.gitlab.com
0
December 24, 2021
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Test coverage report in MR merged from different jobs - GitLab CI/CD - GitLab Forum
September 24, 2021 - In the doc https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualization.html it’s said You can specify one or more coverage reports to collect, including wildcard paths.
🌐
GitLab
gitlab.com › gitlab.org › #426086
Support for multiple code coverage reports (#426086) · Issues · GitLab.org / GitLab · GitLab
September 25, 2023 - Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › testing › code coverage › coverage reporting
Coverage reporting | GitLab Docs
... Add the coverage keyword to your job with a regular expression that matches your test tool’s output: test: script: - pytest --cov coverage: '/TOTAL.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' To aggregate coverage from multiple jobs, add the coverage keyword to each job.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › ci/cd yaml syntax reference › artifacts reports
CI/CD artifacts reports types | GitLab Docs
artifacts: reports: coverage_report: coverage_format: cobertura path: coverage/cobertura-coverage.xml · You can generate multiple reports and collect them using wildcards.
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Combined coverage for a repository - GitLab CI/CD - GitLab Forum
June 28, 2021 - Combined test coverage for a repository (not in the context of an MR) I am aware of a feature in an MR which marks combined code coverage https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualization.html My repo does have multiple cobertura coverage reports being generated Do I have the ability to see the combined coverage for the repo outside the MR context, while I browse the repo on master branch?
Find elsewhere
🌐
Medium
keighleymcf.medium.com › add-aggregated-test-coverage-to-gitlab-pipelines-with-an-nx-monorepo-cf91bc0360f7
Add aggregated test coverage to Gitlab pipelines with an nx monorepo | by Keighley McFarland | hi.health Tech Blog | Medium
March 2, 2023 - For the test coverage format, we chose cobertura because it is compatible with Gitlab CI/CD and because of the available cobertura-merge library for creating aggregated coverage reports.
🌐
GitLab
gitlab.com › gitlab.org › #367317
Improve aggregation of code coverage across jobs (#367317) · Issues · GitLab.org / GitLab · GitLab
July 8, 2022 - Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
🌐
GitLab
docs.gitlab.com › ee › ci › testing › test_coverage_visualization.html
Test coverage visualization
Sign in to GitLab · By signing in you accept the Terms of Use and acknowledge the Privacy Statement and Cookie Policy · Don't have an account yet? Register now · or sign in with · Remember me · Explore Help About GitLab GitLab community forum · English · 简体中文 · 日本語
🌐
Xahteiwi
xahteiwi.eu › resources › hints-and-kinks › coverage-gitlab-ci
xahteiwi.eu – Using coverage with multiple parallel GitLab CI jobs
March 10, 2019 - This instructs coverage to write its results not into one file, .coverage, but into multiple, named .coverage.<hostname>.<pid>.<randomnumber> — meaning you get separate results files for each coverage run. Subsequently, you can combine your coverage data with coverage combine, and then do whatever you like with the combined data (coverage report, coverage html, etc.). Now there’s a bit of a difficulty with GitLab CI, which is that your individual tox testenvs will all run in completely different container instances.
🌐
GitHub
github.com › viezel › GitLab-CI-Scripts › blob › master › .gitlab-ci-php-coverage-report.yml
GitLab-CI-Scripts/.gitlab-ci-php-coverage-report.yml at master · viezel/GitLab-CI-Scripts
# Gitlab CI configuration with PHP Code Coverage HTML report · # We merge multiple suits coverage reports and save those for download · # · stages: - test · · cache: # cache per-job and per-branch · key: "$CI_BUILD_NAME/$CI_BUILD_REF_NAME" paths: - vendor/ ·
Author: viezel
🌐
Aldec
aldec.com › support › resources › documentation › application notes › code coverage visualization in gitlab
Code Coverage Visualization in GitLab - Application Notes - Documentation - Resources - Support - Aldec
GitLab uses CI/CD's artifacts reports feature to collect the coverage information. You can specify one or more coverage report to collect, including wildcard paths. This change should be applied into the .yml file. For the coverage analysis to work, you have to provide a properly formatted ...
🌐
GitHub
gist.github.com › rishitells › 3c4536131819cff4eba2c8ab5bbb4570
Setting up Jest tests and coverage in GitLab CI - Gist - GitHub
You can specify one or more coverage reports to collect, including wildcard paths. GitLab then takes the coverage information in all the files and combines it together.
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Enabling cobertura - GitLab CI/CD - GitLab Forum
April 28, 2020 - Following the docs, I’ve enabled the flag in the console: Feature.all.map {|f| [f.name, f.state]} => [["multiple_merge_request_assignees", :on], ["coverage_report_view", :on]] Looking at the job logs I have confirmed that the report xml is generated, and that it’s also specified in the ...
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Pipeline Cobertura coverage reports - clarification - GitLab CI/CD - GitLab Forum
December 24, 2021 - self-hosted Omnilbus Docker 13.12.3 ... but I think I might know why…) that, per the page at how-test-coverage-visualization-works, multiple Cobertura formatted XML reports can be uploaded as is, and that Gitlab will properly aggregate them for display in the MR diffs ...
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › testing › code coverage
Code coverage | GitLab Docs
Coverage reporting extracts a percentage from your test tool’s job log output. You define a regular expression in the coverage keyword.
🌐
GitHub
gist.github.com › rishitells › 3c4536131819cff4eba2c8ab5bbb4570
Setting up Jest tests and coverage in GitLab CI · GitHub
You can specify one or more coverage reports to collect, including wildcard paths. GitLab then takes the coverage information in all the files and combines it together.
🌐
GitLab
docs.gitlab.com › gitlab docs › use gitlab › use ci/cd to build your application › testing › code coverage › coverage visualization
Coverage visualization | GitLab Docs
test: script: - run tests with coverage artifacts: reports: coverage_report: coverage_format: cobertura # or jacoco path: coverage/coverage.xml ... To collect multiple reports, use a wildcard in the artifact path.