Skip to content

Output coverage to Cobertura report

Pedro Pombeiro requested to merge 25350-enable-coverage into master

What does this MR do?

  • Enables coverage in the unit test job
  • Installs github.com/t-yuki/gocover-cobertura and uses it to convert the coverage reports to a Cobertura XML report
  • Uploads the XML report as a cobertura artifact.

Notes:

  • The first commit (ec1db755) is not supposed to be merged, it is only there to make this MR exemplify how the inline coverage would show up in an MR.
  • the GitLab app has issues interpreting the report generated by gocover-cobertura as-is, namely:

Why was this MR needed?

See #25350 (closed)

What's the best way to test this MR?

  • Check for inline coverage indicators once the coverage_report_view feature is enabled on GitLab.com.
  • Check that !2252 (merged).json shows a JSON file containing data related to the 2 Go files changed.

What are the relevant issue numbers?

Closes #25350 (closed)

Edited by Pedro Pombeiro

Merge request reports