Skip to content

Comments

code-coverage.yml update#158

Merged
mvandeberg merged 1 commit intocppalliance:developfrom
sdarwin:feature/codecoverage
Feb 20, 2026
Merged

code-coverage.yml update#158
mvandeberg merged 1 commit intocppalliance:developfrom
sdarwin:feature/codecoverage

Conversation

@sdarwin
Copy link
Contributor

@sdarwin sdarwin commented Feb 20, 2026

Latest version of the file from https://github.com/boostorg/boost-ci/blob/master/.github/workflows/code-coverage.yml

Summary by CodeRabbit

  • Chores
    • Enhanced code coverage CI: manual trigger, concurrency controls, and expanded test matrix.
    • Coverage reports now published to a dedicated GitHub Pages structure with per-branch views and redirects between develop and master.
    • Improved handling of coverage artifacts and commit messaging to ensure consistent, up-to-date published reports.

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

Modifies the GitHub Actions code-coverage workflow to add workflow_dispatch and concurrency, extend the build matrix (cxxstd), shift branch creation to git switch --orphan, and reorganize coverage publishing into a gh_pages_dir with per-branch (develop/master) pages and updated commit/push steps.

Changes

Cohort / File(s) Summary
Code-coverage workflow
/.github/workflows/code-coverage.yml
Adds manual trigger and concurrency; adds env vars GCOVR_COMMIT_MSG and BOOST_BRANCH_COVERAGE; extends matrix with cxxstd: 20 and gcovr_script; replaces branch creation with git switch --orphan and empty commit; centralizes coverage output into gh_pages_dir with develop/master subdirs, updates checkout/checkout-gh-pages step, index HTML handling, and final commit/amend + force-push logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hopped through CI with a jaunty cheer,
Orphan branches and pages now appear,
Master and develop find tidy home,
GCOVR files no longer roam,
A little rabbit bakes coverage clear. 🥕📊

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using 'update' without specifying what changes were made or why they matter. Provide a more descriptive title that conveys the specific change, such as 'Update code-coverage workflow with latest Boost CI version' or 'Add concurrency grouping and matrix expansion to code-coverage workflow'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/code-coverage.yml:
- Around line 122-125: The workflow can have concurrent runs overwrite the
single amended commit; add a workflow-level concurrency block (e.g., after the
existing env: section) to serialize code-coverage runs by specifying a stable
group name like "code-coverage-pages" and set cancel-in-progress: false so runs
are queued rather than cancelling one another; update the workflow top-level
(not just the job) to include the concurrency stanza to prevent the git commit
--amend + git push -f step from clobbering other branch uploads.
- Around line 116-117: The two shell commands use inconsistent quoting for the
variable ${GITHUB_REF_NAME}; update the cp command so the destination is quoted
like the rm -rf command to avoid word-splitting or empty-variable issues.
Specifically change the cp -rp invocation to use
"gh_pages_dir/${GITHUB_REF_NAME}/" as the target (matching the rm -rf usage),
ensuring both rm -rf and cp reference the same quoted path
(gh_pages_dir/${GITHUB_REF_NAME}/) to prevent accidental copies into
gh_pages_dir// or word-splitting when GITHUB_REF_NAME is empty or contains
spaces.
- Line 118: The generated index HTML uses unquoted attribute values in the echo
command which produces lines like href=develop/index.html; update the echo
content in the workflow step that writes to gh_pages_dir/index.html so the
anchor tags use quoted hrefs (e.g., change href=develop/index.html and
href=master/index.html to href="develop/index.html" and
href="master/index.html") to produce valid HTML.

@cppalliance-bot
Copy link

cppalliance-bot commented Feb 20, 2026

An automated preview of the documentation is available at https://158.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-02-20 22:31:57 UTC

@cppalliance-bot
Copy link

cppalliance-bot commented Feb 20, 2026

GCOVR code coverage report https://158.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://158.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://158.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-02-20 22:34:05 UTC

@sdarwin sdarwin force-pushed the feature/codecoverage branch from d4c0127 to 9b40c76 Compare February 20, 2026 22:24
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/code-coverage.yml (1)

77-80: Nit: quote $GITHUB_REF_NAME on line 80 for consistency.

The rest of the workflow carefully quotes this variable (lines 120-121). While branch names won't have spaces in practice, consistent quoting is good shell hygiene.

Proposed fix
-                git checkout $GITHUB_REF_NAME
+                git checkout "$GITHUB_REF_NAME"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/code-coverage.yml around lines 77 - 80, Quote the
GITHUB_REF_NAME variable in the git checkout command for consistency and safer
shell handling: update the git checkout $GITHUB_REF_NAME invocation (the line
that currently runs git checkout with GITHUB_REF_NAME) to use a quoted variable
form so the command becomes git checkout "$GITHUB_REF_NAME" (preserving existing
behavior while matching how other occurrences are quoted).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/code-coverage.yml:
- Around line 77-80: Quote the GITHUB_REF_NAME variable in the git checkout
command for consistency and safer shell handling: update the git checkout
$GITHUB_REF_NAME invocation (the line that currently runs git checkout with
GITHUB_REF_NAME) to use a quoted variable form so the command becomes git
checkout "$GITHUB_REF_NAME" (preserving existing behavior while matching how
other occurrences are quoted).

@mvandeberg mvandeberg merged commit 2c7c204 into cppalliance:develop Feb 20, 2026
18 checks passed
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.99%. Comparing base (3fbb00d) to head (9b40c76).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #158      +/-   ##
===========================================
- Coverage    82.26%   81.99%   -0.28%     
===========================================
  Files           70       70              
  Lines         5876     5876              
===========================================
- Hits          4834     4818      -16     
- Misses        1042     1058      +16     

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fbb00d...9b40c76. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants