Skip to content

Add validation pass/total badge from workflow outputs - #5

Merged
pmai merged 1 commit into
mainfrom
copilot/enhance-validation-workflow-badge
May 18, 2026
Merged

pmai merged 1 commit into
mainfrom
copilot/enhance-validation-workflow-badge

Conversation

Copilot AI commented May 18, 2026

Copy link
Copy Markdown

This updates the validation workflow to publish test outcome counts (passed/total) as step outputs and uses those outputs to generate a dynamic README badge. The result is a validation badge that reflects suite health as a ratio rather than only workflow status.

  • Workflow outputs for validation suite counts

    • Added JUnit XML emission in validation.yml (--junitxml=validation-results.xml).
    • Added parsing logic to compute total_tests and passed_tests (tests - failures - errors - skipped).
    • Wrote both values to GITHUB_OUTPUT for downstream steps.
  • Dynamic badge generation via Build-A-Badge

    • Added a peterrhodesdev/build-a-badge@v1.3.1 step.
    • Badge message is wired to workflow outputs:
      • ${{ steps.run_validation.outputs.passed_tests }}/${{ steps.run_validation.outputs.total_tests }}.
    • Enabled required repo wiki write access by setting workflow contents: write.
  • README badge integration

    • Added a new Validation Tests badge using Shields endpoint backed by the wiki badge file:
      • validation-suite-tests.md.
- name: Build validation ratio badge
  if: always()
  uses: peterrhodesdev/build-a-badge@v1.3.1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    filename: validation-suite-tests
    label: validation
    message: ${{ steps.run_validation.outputs.passed_tests }}/${{ steps.run_validation.outputs.total_tests }}

@pmai
pmai marked this pull request as ready for review May 18, 2026 09:38
@pmai
pmai merged commit fccfda7 into main May 18, 2026
3 of 4 checks passed
@pmai
pmai deleted the copilot/enhance-validation-workflow-badge branch May 18, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants