Skip to content

Setup Test Coverage Reporting with Codecov Test Results Action#22

Merged
ntindle merged 3 commits into
mainfrom
copilot/fix-20
Aug 22, 2025
Merged

Setup Test Coverage Reporting with Codecov Test Results Action#22
ntindle merged 3 commits into
mainfrom
copilot/fix-20

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 15, 2025

This PR implements test coverage reporting using Codecov's test results action to enable failed test reporting in PR comments and the Codecov dashboard.

Changes Made

CI Workflow Updates

  • Modified the CI workflow to generate JUnit XML test reports using vitest --reporter=junit --outputFile=test-report.junit.xml
  • Added dual reporters (--reporter=verbose --reporter=junit) to maintain console output while generating XML
  • Integrated codecov/test-results-action@v1 to upload test results to Codecov with proper error handling

Configuration

  • Added test-report.junit.xml to .gitignore to prevent committing test reports
  • Updated test artifact uploads to include JUnit XML files for debugging and historical records
  • Configured upload step with if: ${{ !cancelled() }} to ensure test results are uploaded even when tests fail

Verification

The implementation has been thoroughly tested with both passing and failing test scenarios:

<!-- Example of captured failure in JUnit XML -->
<testcase classname="temp-failing-test.test.ts" name="should fail to test JUnit XML format">
    <failure message="expected true to be false" type="AssertionError">
        AssertionError: expected true to be false
        ❯ temp-failing-test.test.ts:5:18
    </failure>
</testcase>

Benefits

  • Enhanced PR Feedback: Failed tests will now appear in PR comments with detailed error information
  • Test Analytics Dashboard: Codecov will provide insights into test trends and failure patterns
  • Improved Debugging: JUnit XML artifacts provide structured test data for analysis
  • Zero Breaking Changes: All existing functionality remains intact with 213 tests continuing to pass

The repository already had comprehensive test coverage reporting via codecov/codecov-action@v5 for code coverage. This PR adds the complementary test results reporting for better visibility into test failures and trends.

Fixes #20.


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

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 15, 2025

@ntindle 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 15, 2025

Deploy Preview for gridfinity-drawer-planner ready!

Name Link
🔨 Latest commit 2737e2c
🔍 Latest deploy log https://app.netlify.com/projects/gridfinity-drawer-planner/deploys/689f4b27bb8f620007c0a206
😎 Deploy Preview https://deploy-preview-22--gridfinity-drawer-planner.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@2756f0e). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #22   +/-   ##
=======================================
  Coverage        ?   64.50%           
=======================================
  Files           ?       49           
  Lines           ?     3381           
  Branches        ?      319           
=======================================
  Hits            ?     2181           
  Misses          ?     1178           
  Partials        ?       22           
Flag Coverage Δ
unittests 64.50% <ø> (?)

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 15, 2025

PR Quality Report 📊

Check Status
TypeScript
ESLint
Tests
Build

View detailed results

Copilot AI and others added 2 commits August 15, 2025 14:56
Co-authored-by: ntindle <8845353+ntindle@users.noreply.github.com>
Co-authored-by: ntindle <8845353+ntindle@users.noreply.github.com>
Copilot AI changed the title [WIP] Setup Code Coverage Test Reporting Setup Test Coverage Reporting with Codecov Test Results Action Aug 15, 2025
Copilot AI requested a review from ntindle August 15, 2025 15:01
@ntindle ntindle marked this pull request as ready for review August 22, 2025 04:49
@ntindle ntindle merged commit 37d11de into main Aug 22, 2025
35 of 36 checks passed
@ntindle ntindle deleted the copilot/fix-20 branch August 22, 2025 04:53
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.

Setup Code Coverage Test Reporting

3 participants