Skip to content

Conversation

@DamianReeves
Copy link
Member

Summary

Implements comprehensive testing infrastructure with code coverage tracking and reporting.

Changes

Just Recipes

  • test-coverage: Run tests with coverage, merge profiles, show summary
  • test-junit: Run tests with JUnit XML output using gotestsum

CI/CD Enhancements

  • Generate coverage on all test runs with atomic coverage mode
  • Upload coverage artifacts and test results for all platforms
  • Publish test summaries using test-summary/[email protected]
  • Add coverage-report job for automated PR comments with fgrosse/[email protected]
  • Continue uploading to Codecov for historical tracking

Configuration

  • Add coverage/, coverage.out, test-results/ to .gitignore
  • Update test job to use test-junit recipe for comprehensive reporting

Documentation

  • Add "Testing and Code Coverage" section to morphir-go-preview.md
  • Document local testing commands and coverage workflows
  • Explain CI/CD integration and PR coverage comments
  • Include emoji indicators for coverage changes

Benefits

  • ✅ Track code coverage trends over time
  • ✅ See coverage impact directly in PR reviews
  • ✅ Better visibility into test results with GitHub Actions summaries
  • ✅ Identify untested code paths
  • ✅ Automated test result reports

Test Plan

  • Added new Just recipes (test-coverage, test-junit)
  • Updated CI workflow to use new recipes
  • Added coverage-report job for PR comments
  • Updated documentation
  • Verify CI runs successfully (will test in this PR)
  • Verify coverage report appears in PR comments

Related Issues

Closes morphir-rnt

🤖 Generated with Claude Code

@netlify
Copy link

netlify bot commented Jan 6, 2026

Deploy Preview for angry-raman-7c44f6 canceled.

Name Link
🔨 Latest commit 1acfe29
🔍 Latest deploy log https://app.netlify.com/projects/angry-raman-7c44f6/deploys/695c5c244fad260008137bcc

Add comprehensive testing infrastructure with code coverage tracking:

Just Recipes:
- test-coverage: Run tests with coverage, merge profiles, show summary
- test-junit: Run tests with JUnit XML output using gotestsum

CI/CD Enhancements:
- Generate coverage on all test runs with atomic coverage mode
- Upload coverage artifacts and test results
- Publish test summaries using test-summary/action v2.4
- Add coverage-report job for PR comments with fgrosse/go-coverage-report
- Continue uploading to Codecov for historical tracking

Configuration:
- Add coverage/, coverage.out, test-results/ to .gitignore
- Update test job to use test-junit recipe for comprehensive reporting

Documentation:
- Add Testing and Code Coverage section to morphir-go-preview.md
- Document local testing commands and coverage workflows
- Explain CI/CD integration and PR coverage comments
- Include emoji indicators for coverage changes

Benefits:
- Track code coverage trends over time
- See coverage impact directly in PR reviews
- Better visibility into test results with GitHub Actions summaries
- Identify untested code paths
- Automated test result reports

Relates to morphir-rnt
The test-junit recipe was failing because the coverage directory didn't
exist when tests tried to write coverage files. Now we create both
test-results and coverage directories upfront.

Also added coverage merging step to test-junit recipe to generate
the final coverage.out file that CI expects.
The test-junit and test-coverage recipes were failing because they used
relative paths (../coverage/) which don't work correctly when cd'ing into
subdirectories. When in cmd/morphir, ../coverage/ points to morphir/cmd/coverage/
instead of morphir/coverage/.

Now we capture the repo root path upfront and use absolute paths for all
coverage and test result file locations.
@DamianReeves DamianReeves force-pushed the feat/code-coverage-reporting branch from 59f68d7 to 08fa21b Compare January 6, 2026 00:40
The coverage-report job fails when trying to download baseline coverage
from the main branch if it doesn't exist yet (which is expected for the
first time adding coverage support). Adding continue-on-error allows the
job to proceed gracefully without failing the entire CI run.

Once this PR is merged and main has coverage artifacts, future PRs will
be able to compare against the baseline.
@DamianReeves DamianReeves merged commit fbce21d into main Jan 6, 2026
18 checks passed
@DamianReeves DamianReeves deleted the feat/code-coverage-reporting branch January 6, 2026 00:57
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