Skip to content

fix(ci): publish coverage badge via GitHub Pages#1108

Merged
tomcasaburi merged 1 commit intomasterfrom
codex/fix/coverage-badge-pages
Mar 17, 2026
Merged

fix(ci): publish coverage badge via GitHub Pages#1108
tomcasaburi merged 1 commit intomasterfrom
codex/fix/coverage-badge-pages

Conversation

@tomcasaburi
Copy link
Member

@tomcasaburi tomcasaburi commented Mar 17, 2026

Summary

  • replace the branch-based coverage badge publish step with a GitHub Pages deployment
  • point the README coverage badge at the Pages-hosted JSON endpoint
  • stop tracking generated badge JSON in git so local coverage runs do not dirty the tree

Verification

  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/ci.yml"); puts "yaml ok"'
  • yarn install --frozen-lockfile --ignore-engines --network-timeout 100000 --network-concurrency 1
  • yarn test:coverage
  • node scripts/write-coverage-badge.mjs
  • yarn lint
  • yarn type-check

Note

Medium Risk
Changes the CI coverage badge publishing mechanism and GitHub permissions to use Pages/OIDC, which could break badge updates if Pages/environment settings are misconfigured. No production application code paths are affected.

Overview
Switches coverage badge publishing from force-pushing a badges branch to deploying a small GitHub Pages artifact containing badges/coverage.json (with .nojekyll), updating the workflow to use configure-pages, upload-pages-artifact, and deploy-pages with Pages/OIDC permissions.

Updates the README badge endpoint to the new Pages URL, and stops tracking/generated badges/ output in git by adding it to .gitignore and removing the committed badges/coverage.json.

Written by Cursor Bugbot for commit 2de723a. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Documentation

    • Updated coverage badge URL in README.
  • Chores

    • Refactored coverage badge deployment infrastructure.
    • Updated version control ignore rules.

@vercel
Copy link

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
5chan Ready Ready Preview, Comment Mar 17, 2026 0:24am

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 19c5c7d2-6d0a-4f47-8a66-843bf97515a0

📥 Commits

Reviewing files that changed from the base of the PR and between ebf5ab6 and 2de723a.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • .gitignore
  • README.md
  • badges/coverage.json

📝 Walkthrough

Walkthrough

The CI workflow for publishing the coverage badge is reworked to use GitHub Pages deployment instead of git branch operations. The coverage badge URL in documentation is updated, the badges directory is added to .gitignore, and the static badge JSON file is removed.

Changes

Cohort / File(s) Summary
CI Workflow Update
.github/workflows/ci.yml
Refactors the Publish Coverage Badge job from git-based operations (branch creation, commits, pushes) to a GitHub Pages deployment flow. Adds artifact preparation, badge directory creation, .nojekyll file generation, and Pages deployment configuration with appropriate permissions and environment settings.
Badge and Configuration
.gitignore, badges/coverage.json
Adds /badges/ directory to the ignore rules and removes the static coverage badge JSON file that previously defined the badge payload.
Documentation
README.md
Updates the coverage badge URL from raw.githubusercontent.com endpoint to bitsocial.github.io endpoint.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #1091: Published coverage badge to a dedicated branch via git operations; this PR replaces that approach with GitHub Pages deployment, representing an architectural shift in badge distribution.

Poem

🐰 Badges shine on Pages bright,
No more branches in the night,
Git operations fade away,
Coverage glows in GitHub's bay!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix/coverage-badge-pages
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@tomcasaburi tomcasaburi merged commit 85ea159 into master Mar 17, 2026
4 of 5 checks passed
@tomcasaburi tomcasaburi deleted the codex/fix/coverage-badge-pages branch March 17, 2026 12:31
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.

1 participant