Skip to content

Conversation

@panarch
Copy link
Member

@panarch panarch commented Oct 7, 2025

Summary

  • unzip the uploaded lcov artifact during the publish workflow and compute overall line coverage statistics
  • include the line coverage percentage and hit/total counts alongside the coverage link in the PR comment

Testing

  • cargo fmt
  • cargo clippy --all-targets -- -D warnings
  • cargo test

Summary by CodeRabbit

  • New Features

    • Pull request comments now show line coverage: percentage and hits/total, displayed before existing metadata for visibility.
    • Coverage stats are included alongside report links for quick review.
  • Chores

    • CI extracts and parses coverage artifacts, exporting summary values for use in later steps.
    • More robust parsing with fallbacks and ensured inclusion when updating comments.

@coderabbitai
Copy link

coderabbitai bot commented Oct 7, 2025

Walkthrough

Adds a GitHub Actions step that decompresses and parses LCOV (LF/LH/DA) to compute line-coverage metrics, exports LINE_COVERAGE/LINE_HITS/LINE_FOUND to GITHUB_ENV, and updates PR-comment generation to include a "Line Coverage: X% (Y/Z)" line when those vars exist.

Changes

Cohort / File(s) Summary of changes
CI: Coverage extraction and PR comment update
.github/workflows/publish-coverage.yml
Added an "Extract coverage summary" step that decompresses coverage/lcov.info.xz, runs an inline Python parser to read LF:, LH:, and DA: counters, computes line coverage (with DA fallback when LF is zero), exports LINE_COVERAGE, LINE_HITS, and LINE_FOUND to GITHUB_ENV, prints results, and extended PR comment construction to read these env vars and prepend a Line Coverage: X% (Y/Z) line when present.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Runner as GitHub Actions Runner
  participant Workspace as Workspace FS
  participant Parser as Inline Python Parser
  participant Env as GITHUB_ENV
  participant Script as PR comment step
  participant PR as Pull Request

  rect #EEF6FF
    note left of Runner: publish-coverage workflow
    Runner->>Workspace: Decompress coverage/lcov.info.xz -> coverage/lcov.info
    Runner->>Parser: Run inline Python to parse LF/LH/DA
    Parser->>Env: Export LINE_COVERAGE, LINE_HITS, LINE_FOUND
    Parser-->>Runner: Print computed coverage
  end

  rect #F5FFF0
    Runner->>Script: Run PR comment step
    Script->>Env: Read LINE_COVERAGE / LINE_HITS / LINE_FOUND
    alt LINE_COVERAGE present
      Script->>Script: Ensure single coverage line in body
      Script->>PR: Post or update comment with "Line Coverage: X% (Y/Z)"
    else Missing coverage vars
      Script->>PR: Post or update comment without coverage line
    end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

I hop through LF and LH with care,
Counting DA footprints everywhere.
I set my numbers in the env so bright,
A tiny PR line shows coverage light.
🐰📊

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the primary change of adding a coverage summary to the coverage bot’s PR comment, matching the pull request’s main objective of computing and displaying line coverage statistics in the comment.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-coverage-summary

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1410e0 and 9b397ff.

📒 Files selected for processing (1)
  • .github/workflows/publish-coverage.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish-coverage.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Wasm Build
  • GitHub Check: coverage

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.

@gluesql-coverage-bot
Copy link

gluesql-coverage-bot bot commented Oct 7, 2025

Glues Coverage Report

  • Line Coverage: 58.72% (3595/6122)
  • Commit: 9b397ff0dd0aa14c3a1de7ee6eb55f315fad59be
  • Timestamp: 2025-10-11T091349Z
  • Report: View report

@panarch panarch self-assigned this Oct 7, 2025
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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 596b12d and ce78ae6.

📒 Files selected for processing (1)
  • .github/workflows/publish-coverage.yml (2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/publish-coverage.yml

84-84: could not parse as YAML: yaml: line 84: could not find expected ':'

(syntax-check)

🪛 YAMLlint (1.37.1)
.github/workflows/publish-coverage.yml

[error] 86-86: syntax error: could not find expected ':'

(syntax)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Wasm Build
  • GitHub Check: coverage

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