Skip to content

Show zero based coverage for jobs

Payton Burdette requested to merge 237931-show-zero-based-coverage into master

What does this MR do and why?

Jobs without coverage setup return null | Jobs with zero coverage return 0. We do not differentiate between these in the UI, which could cause some confusion if a job had zero coverage vs a job that was not setup with coverage. This MR shows zero based coverage on the jobs list and job summary.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Job summary

Before After
Screenshot_2024-04-23_at_11.41.39_AM Screenshot_2024-04-23_at_1.04.53_PM

Job list

Before After
Screenshot_2024-04-23_at_11.36.54_AM Screenshot_2024-04-23_at_1.04.44_PM

How to set up and validate locally

  1. Setup jobs with coverage, with zero based coverage and without coverage.
  2. View those jobs on jobs list and job summary

Example job

coverage_job_zero:
  stage: test
  script: echo "0"
  coverage: '/^0$/'

Related to #237931 (closed)

Edited by Payton Burdette

Merge request reports