Repository navigation
Surface coverage percentages in the CI job output and titles - #206
Merged
sarroutbi merged 1 commit intoDec 2, 2026
Merged
Conversation
The Report coverage step appended its markdown table only to $GITHUB_STEP_SUMMARY, so the step produced no output in the job log and the percentages were only visible on the run's Summary page (or buried in the raw vitest output of the test step). From the job view it looked like coverage ran but was never reported. Print the coverage table to stdout so it lands in the job log, and emit a ::notice annotation with the headline percentages so they show up in the job's Annotations section without expanding any steps. The step summary table is preserved, now written from node instead of a shell redirect so the notice command does not leak into the summary file. When coverage/coverage-summary.json is missing (test step failed early), emit a ::warning and exit 0 so the test step remains the single point of failure instead of adding a confusing second red step. Also surface the headline lines coverage percentage without opening any logs: the Report coverage step exports lines-pct through $GITHUB_OUTPUT, a follow-up step is titled with the value, and a tiny lines-coverage job titled via needs.test.outputs shows it in the jobs sidebar and PR checks list. A job cannot read its own steps' outputs, so the value must flow into a downstream job. Both dynamic names fall back to 'n/a' when no coverage summary was produced, and the follow-up job runs with if: always() so the percentage is reported even when the test job fails. Resolves: keylime-webtool#204 Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Report coverage step appended its markdown table only to $GITHUB_STEP_SUMMARY, so the step produced no output in the job log and the percentages were only visible on the run's Summary page (or buried in the raw vitest output of the test step). From the job view it looked like coverage ran but was never reported.
Print the coverage table to stdout so it lands in the job log, and emit a ::notice annotation with the headline percentages so they show up in the job's Annotations section without expanding any steps. The step summary table is preserved, now written from node instead of a shell redirect so the notice command does not leak into the summary file.
When coverage/coverage-summary.json is missing (test step failed early), emit a ::warning and exit 0 so the test step remains the single point of failure instead of adding a confusing second red step.
Also surface the headline lines coverage percentage without opening any logs: the Report coverage step exports lines-pct through $GITHUB_OUTPUT, a follow-up step is titled with the value, and a tiny lines-coverage job titled via needs.test.outputs shows it in the jobs sidebar and PR checks list. A job cannot read its own steps' outputs, so the value must flow into a downstream job. Both dynamic names fall back to 'n/a' when no coverage summary was produced, and the follow-up job runs with if: always() so the percentage is reported even when the test job fails.
Resolves: #204