Repository navigation
codecov: grade the unit and symmetry test suites together - #147
Merged
Merged
Conversation
Since the symmetry tests left the general test job (#146), Codecov only saw the general job's coverage, so 262 lines of +ndr reader/format code that only the symmetry tests reach counted as uncovered. - test-symmetry.yml: run the make and read suites with CodeCoveragePlugin over the same +ndr files matbox.tasks.testToolbox measures, producing a Cobertura report, and upload it to Codecov with flag "symmetry". The two suites now run in ONE runner.run call (make cases first, then read; a suite runs in order), because a coverage plugin writes its report at the end of each run and two runs would keep only the second's. Results are split by index for the per-stage summaries. - run_tests.yml: tag the general job's upload with flag "unittests". - codecov.yml: codecov.notify.after_n_builds and comment.after_n_builds = 2, so the status checks and PR comment wait for both uploads instead of grading whichever lands first. The 3% project threshold is unchanged. Written without access to MATLAB; CI runs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
==========================================
+ Coverage 52.21% 54.94% +2.72%
==========================================
Files 164 164
Lines 9598 9598
==========================================
+ Hits 5012 5274 +262
+ Misses 4586 4324 -262
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #146 took the symmetry tests out of the general test job, Codecov only receives the general job's coverage. So 262 lines of
+ndrreader/format code that only the symmetry tests reach count as uncovered: 54.94% → 52.21%. This PR uploads the symmetry workflow's coverage too. Codecov merges every upload for a commit, so both suites count in one grade.Changes
.github/workflows/test-symmetry.yml:CodeCoveragePluginand writes a Cobertura report. It measures the same+ndrfile listmatbox.tasks.testToolboxuses, so the two reports line up.codecov/codecov-action@v4,flags: symmetry, using the sameCODECOV_TOKENsecret the general job uses.runner.runcall: make cases first, then read, since a suite runs in order. A coverage plugin writes its report at the end of eachrun, so the old two-call version would have kept only the read stage's coverage. Results are split by index, so the per-stage summaries and the Incomplete check are unchanged..github/workflows/run_tests.yml: the general job's upload is now taggedflags: unittests, so Codecov shows the two sources separately.codecov.yml:codecov.notify.after_n_builds: 2andcomment.after_n_builds: 2. Codecov waits for both uploads before posting its checks and comment, rather than grading whichever lands first, which could flicker red and green. The 3% project threshold is unchanged.Expected effect
unittestsandsymmetryflags.run_tests.ymlskips changes that touch only*.mdor only.github/workflows/**, so those commits would have one upload instead of two. That's no worse than today: those commits got no coverage upload at all, becauserun_tests.ymlwas the only uploader.Verification
I wrote this without access to MATLAB, so CI is the first run. The coverage setup copies MatBox's own
testToolbox.m(same plugin, same file list). After CI, I'll check that the symmetry job wrote and uploadedsymmetry-coverage.xml, and what merged figure Codecov reports.Generated by Claude Code