Repository navigation
tests: exclude the symmetry tests from the general test job - #146
Conversation
The general test job (run_tests.yml -> tools/tasks/testToolbox.m) collects
every test under tools/tests, so it also ran the cross-language symmetry
tests. Those run properly in the symmetry workflows, which make the
artifacts they read and run them in order. In this job they only repeated
that work, and since Python never runs here, every pythonArtifacts read
case came back skipped: a standing set of 7 skips on every run.
- Tag all 14 symmetry test classes TestTags = {'Symmetry'}.
- testToolbox.m passes ExcludeTags="Symmetry" to matbox.tasks.testToolbox
(MatBox's supported way to deselect; it has no folder exclusion).
- +unittest/TestSymmetryTestsAreTagged fails if any test under
ndr.symmetry lacks the tag, so a new symmetry test cannot slip back in.
- Both symmetry INSTRUCTIONS.md files say to tag new classes.
The symmetry workflows collect tests with TestSuite.fromPackage and do not
filter by tag, so they are unaffected.
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
Test Results395 tests - 20 392 ✅ - 13 36s ⏱️ +10s Results for commit af078b9. ± Comparison against base commit e2e96be. This pull request removes 21 and adds 1 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
==========================================
- Coverage 54.94% 52.21% -2.73%
==========================================
Files 164 164
Lines 9598 9598
==========================================
- Hits 5274 5012 -262
- Misses 4324 4586 +262 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Options:
I haven't changed the threshold, since that would quietly weaken a check. Tell me which option you want and I'll do it. Generated by Claude Code |
Excluding the symmetry tests from the general test job (previous commit) drops measured coverage by 2.73% (262 lines of +ndr code that only the symmetry tests reach), and with no codecov.yml Codecov's default fails codecov/project on any drop at all. Add a codecov.yml with a 3% project threshold against the base; a larger drop still fails. Patch status is unchanged (target auto). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX
|
Went with option 2: Generated by Claude Code |
The general test job (
run_tests.yml→tools/tasks/testToolbox.m→matbox.tasks.testToolbox) collects every test undertools/tests, so it also ran the cross-language symmetry tests. Those already run in the symmetry workflows: NDR-matlab'stest-symmetry.ymland NDR-python's cross-language one. There they get the artifacts they read and run in order.In the general job they only repeated that work. Python never runs here, so since #145 every
pythonArtifactsread case shows up as skipped: a standing set of 7 skips on every run.Changes
classdef (TestTags = {'Symmetry'}) ….tools/tasks/testToolbox.mpassesExcludeTags="Symmetry". MatBox'stestToolboxhas no folder exclusion, but it does supportExcludeTags. The action calls this repo-local wrapper when it exists, sorun_tests.ymlneeds no change.tools/tests/+ndr/+unittest/TestSymmetryTestsAreTagged.m: fails if any test underndr.symmetrylacks the tag. The exclusion is only as good as the tags, so a new symmetry test can't quietly slip back into the general job.INSTRUCTIONS.mdfiles: a rule to tag new classes, and thereadArtifactsexample now shows the tag.codecov.yml: the project check allows a coverage drop of up to 3% against the base, instead of Codecov's default of failing on any drop. The patch check is unchanged (target: auto). See Coverage below.The symmetry workflows collect tests with
TestSuite.fromPackageand don't filter by tag, so they're unaffected.Result
+ndrreader/format code are reached only by the symmetry tests, and no unit test covers them. With nocodecov.yml,codecov/projectfailed on that drop. The maintainer chose to allow drops of up to 3% (option 2 in the discussion below), so this drop passes and a larger one still fails. Unit tests for those lines would be the lasting fix.Verification
I wrote this without access to MATLAB, so CI is its first run. The test syntax (
TestTagsclass attribute,Test.Tags) and theExcludeTagsoption are taken from MatBox's owntestToolbox.msource. I couldn't reach Codecov's validator from my environment, so this PR'scodecov/projectcheck is what confirmscodecov.yml.🤖 Generated with Claude Code
https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX