Skip to content

Coverage badge auto-update via GitHub Pages workflow #27

Description

@takker99

Priority: P3
Category: DevOps / Reporting

Background:
After adding coverage reporting, a visual badge keeps repository status visible. Without an external service, GitHub Pages + workflow can publish a static SVG updated on main merges.

Goal:
Automate generation & publication of coverage badge (SVG) to a gh-pages branch (or /docs) and reference it in README.

Acceptance Criteria:

  • Workflow triggered on push to main after tests
  • Generates coverage summary (parse lcov or vitest summary) -> compute line %
  • Renders SVG badge (shield style) and publishes to gh-pages (or docs/coverage-badge.svg on main)
  • README embeds badge
  • Idempotent (only updates when value changes to reduce noise)

Tasks:

  1. Add script to parse lcov and output JSON + SVG
  2. Workflow job (after CI) to checkout pages branch, update asset, push
  3. Conditional commit (skip if unchanged)
  4. README badge URL update
  5. Document maintenance in Dev section

Definition of Done:
Badge updates when coverage changes; no infinite commit loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions