I have successfully generated a Cobertura format xml for my coverage that stores in tests/_output/cobertura.xml. And I can also see my artifacts setting work there:
@yookoala Thanks for the post and welcome to the forum!
I’m glad to see you got the text coverage visualization working!
To get the badge working you still need to setup parsing for the coverage value from the logs as described here in the documentation. Looking at your latest Merge Request adding ^\s*Lines:\s*\d+.\d+\% should work and then the badge will start to work once a pipeline has completed.
OK, I found it, and it works, but here’s some feedback:
It’s quite confusing that you need to change two different sections of the job configuration to enable the code coverage features of GitLab. Some features are enabled by the coverage attribute and the corresponding regex, and others are enabled by the coverage report under artifacts.
It also doesn’t make a lot of sense that only one format (Cobertura) is supported for the report and multiple are supported for the regex.