Code Coverage Badge should not say "unknown" when the most recent job hasn't run code coverage
Problem to solve
The status of coverage report badge for a job will become "unknown" if the associated job is not run in the latest pipeline. this is troublesome, usually we don't want to run every job in a pipeline, can we make the coverage badge status persistent from the job's last run if nothing new is available in the latest pipeline?
Running every job each time can slow down the pipeline a lot.
Intended users
As Delaney/Sasha/Simone I want my code coverage badge to always display the most recent coverage value even if the most recent pipeline did not run my coverage job so I can always know what the most recent code coverage value is at a glance. I don't always want to run the coverage job in order to optimize my pipeline runtime and reduce my pipeline costs.
Further details
Coverage Job State | Pipeline State | What to display on badge |
---|---|---|
Ran Successfully | Pass/Fail/Not Finished | This pipeline's coverage job value* |
Fail | Pass | Unknown - staying the same |
Fail | Fail | Unknown - staying the same |
Fail | Not Finished | Unknown - staying the same |
Not run | Pass / Fail / Not Finished | Use last good job - new change |
- Dependent on linked issue being completed.
Proposal
Keep the coverage status for a job from last successful pipeline if the associated job is not created for the new pipeline
Permissions and Security
Documentation
Testing
What does success look like, and how can we measure that?
When I have code coverage data, the code coverage badge no longer displays unknown.