Skip to content

Update CI workflow for test results and coverage upload#1929

Merged
openminddev merged 2 commits intomainfrom
upload-test-results
Jan 27, 2026
Merged

Update CI workflow for test results and coverage upload#1929
openminddev merged 2 commits intomainfrom
upload-test-results

Conversation

@openminddev
Copy link
Copy Markdown
Contributor

This pull request updates the unit test workflow configuration to improve test reporting and artifact handling. The main changes involve switching to Codecov's test results action, refining when reports are uploaded, and adjusting test output formats.

Unit test workflow improvements:

  • Changed the pytest command to generate a JUnit XML report (junit.xml) and set the JUnit family to legacy, which can improve compatibility with reporting tools.
  • Updated the condition for uploading coverage and test results from always() to only run if the workflow is not cancelled, making the workflow more efficient.
  • Replaced the upload of test results and coverage HTML reports as artifacts with the use of Codecov's test-results-action, which uploads the JUnit XML test results directly to Codecov.
  • Removed the upload of the HTML coverage report and .pytest_cache/ as artifacts, streamlining the workflow and reducing unnecessary uploads.

Switch to using codecov/test-results-action for uploading test results and adjust coverage report upload conditions. Add junit.xml to .gitignore to prevent committing test result files.
Copilot AI review requested due to automatic review settings January 27, 2026 05:29
@openminddev openminddev requested review from a team as code owners January 27, 2026 05:29
@github-actions github-actions Bot added ci-cd CI/CD changes config Configuration files labels Jan 27, 2026
Copy link
Copy Markdown
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 pull request modernizes the CI/CD pipeline's test reporting by migrating from artifact-based uploads to Codecov's native test results integration, improving test compatibility and reducing workflow complexity.

Changes:

  • Modified pytest execution to generate JUnit XML output with legacy family format for better tool compatibility
  • Replaced artifact uploads with Codecov's test-results-action for direct test result integration
  • Changed upload conditions from always() to !cancelled() to prevent uploads when workflows are manually cancelled

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/unitest.yml
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Replaces codecov/test-results-action@v1 with codecov/codecov-action@v5 and adds the report_type parameter for uploading test results.
@openminddev openminddev merged commit 2eaaf87 into main Jan 27, 2026
7 checks passed
@openminddev openminddev deleted the upload-test-results branch January 27, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI/CD changes config Configuration files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants