Skip to content

Extract coverage badge generation to dedicated workflow using rhiza-tools#592

Open
Copilot wants to merge 8 commits intomainfrom
copilot/create-coverage-badge-workflow
Open

Extract coverage badge generation to dedicated workflow using rhiza-tools#592
Copilot wants to merge 8 commits intomainfrom
copilot/create-coverage-badge-workflow

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Coverage badge generation was embedded in the make book target. This extracts it to a standalone workflow using the built-in rhiza-tools command.

Changes

New workflow .github/workflows/rhiza_coverage_badge.yml

  • Runs on push to main/master
  • Uses uvx "rhiza-tools>=0.2.0" generate-coverage-badge
  • Uploads badge JSON as artifact (90-day retention)

Modified .rhiza/make.d/book.mk

  • Removed inline badge generation logic (-17 lines)

Deleted .rhiza/utils/generate_coverage_badge.py

  • Custom script replaced by rhiza-tools command (-103 lines)

Example

Badge generation now uses the official rhiza-tools CLI:

uvx "rhiza-tools>=0.2.0" generate-coverage-badge \
  --coverage-json _tests/coverage.json \
  --output _badge/coverage-badge.json

Previously required custom Python script maintained separately.

Original prompt

This section details on the original issue you should resolve

<issue_title>Coverage badge should be constructed in its own workflow.</issue_title>
<issue_description>not hidden somewhere in "make book"</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 8, 2026 10:43
Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
@tschm
Copy link
Member

tschm commented Feb 8, 2026

@copilot: no need to include the construction in rhiza_book.yml

Copilot AI changed the title [WIP] Add coverage badge to its own workflow Extract coverage badge generation into dedicated workflow Feb 8, 2026
Copilot AI requested a review from tschm February 8, 2026 10:50
Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 8, 2026

@copilot: no need to include the construction in rhiza_book.yml

Removed in 3783ac1. The book workflow no longer includes badge generation - it's now only in the dedicated coverage badge workflow.

@tschm
Copy link
Member

tschm commented Feb 8, 2026

@copilot: but the actual construction of the badge is also a command in rhiza-tools. Use that instead of having the py file in utils

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Copilot AI changed the title Extract coverage badge generation into dedicated workflow Extract coverage badge generation to dedicated workflow using rhiza-tools Feb 8, 2026
@tschm tschm requested a review from HarryCampion February 8, 2026 10:59
@tschm tschm marked this pull request as ready for review February 8, 2026 10:59
@HarryCampion
Copy link
Collaborator

Does this need to be a workflow?

@tschm
Copy link
Member

tschm commented Feb 8, 2026

I think so. It's hidden in the book workflow. So better to be more isolated as some repos have tests but no book

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.

Coverage badge should be constructed in its own workflow.

3 participants