Skip to content

Fix Code Coverage workflow#271

Merged
christianhelle merged 3 commits intomainfrom
fix-codecov-workflow
Oct 15, 2025
Merged

Fix Code Coverage workflow#271
christianhelle merged 3 commits intomainfrom
fix-codecov-workflow

Conversation

@christianhelle
Copy link
Owner

@christianhelle christianhelle commented Oct 15, 2025

Switch to using "XPlat Code coverage" for testing, remove the unnecessary conversion step from the Codecov workflow, and update the upload process to utilize coverage.cobertura.xml for report submissions.

Summary by CodeRabbit

  • Chores
    • Updated code coverage collection to a cross-platform option in the test workflow.
    • Simplified the workflow by removing the coverage conversion step.
    • Adjusted coverage upload to use a broader file pattern for detection.

Copilot AI review requested due to automatic review settings October 15, 2025 09:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the code coverage workflow by switching to a more efficient XPlat Code coverage collection method and streamlining the Codecov upload process. The changes eliminate an unnecessary intermediate conversion step and use the standard Cobertura XML format directly.

  • Switches from "Code coverage" to "XPlat Code coverage" collector for test execution
  • Removes the manual coverage conversion step that used dotnet-coverageconverter
  • Updates Codecov upload to use coverage.cobertura.xml files directly

@coderabbitai
Copy link

coderabbitai bot commented Oct 15, 2025

Walkthrough

The workflow updates switch test coverage collection to XPlat Code Coverage, remove the coverage conversion step, and change the Codecov upload to use a Cobertura glob pattern (**/coverage.cobertura.xml).

Changes

Cohort / File(s) Summary of Changes
CI: Code coverage workflow
\.github/workflows/codecov.yml
- Use XPlat Code Coverage in test step
- Remove coverage conversion PowerShell step
- Update Codecov upload to glob **/coverage.cobertura.xml

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Dev as Developer
    participant GH as GitHub Actions Runner
    participant Test as dotnet test
    participant Cov as XPlat Code Coverage
    participant Upl as Codecov Uploader

    Dev->>GH: Push/PR triggers workflow
    GH->>Test: Run tests with coverage (collect:XPlat)
    Test->>Cov: Produce coverage.cobertura.xml
    note over Cov: Coverage files at **/coverage.cobertura.xml
    GH->>Upl: Upload coverage using glob pattern
    Upl-->>GH: Report upload result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I hopped through YAML fields at night,
Swapped tools to catch the metrics right—
No more convert, clean and neat,
Cobertura crumbs beneath my feet.
With globs I trace each testing trail,
Then boop Codecov—success, no fail! 🐇✨

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 captures the primary change of this pull request by indicating that the code coverage workflow is being fixed, which aligns directly with the updates to the test step, removal of the conversion step, and adjustment of the upload configuration described in the changeset.
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 fix-codecov-workflow

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.

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.21%. Comparing base (4db549f) to head (59105a1).
⚠️ Report is 41 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #271      +/-   ##
==========================================
+ Coverage   83.26%   84.21%   +0.94%     
==========================================
  Files          17       12       -5     
  Lines         789      551     -238     
  Branches        0       76      +76     
==========================================
- Hits          657      464     -193     
- Misses         60       72      +12     
+ Partials       72       15      -57     
Flag Coverage Δ
unittests 84.21% <ø> (+0.94%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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 327e998 and 59105a1.

📒 Files selected for processing (1)
  • .github/workflows/codecov.yml (2 hunks)
⏰ 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). (3)
  • GitHub Check: build
  • GitHub Check: 👌 Verify build
  • GitHub Check: 👌 Verify build

@christianhelle christianhelle merged commit 2651197 into main Oct 15, 2025
8 checks passed
@christianhelle christianhelle deleted the fix-codecov-workflow branch October 15, 2025 09:55
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