Repository navigation
fix(coverage): skip new test files in the unreported-source check - #117
Merged
Merged
Conversation
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.
Summary
The unreported-source check added in #63 flags every new file that has a reported extension, sits in a reported directory and is missing from the coverage reports. Test files colocated with the sources (vitest/jest
*.test.ts,*.spec.ts,__tests__/) match all three, because coverage tools never report test files, so any PR adding a colocated test fails the gate. Python callers keep their tests undertests/, outside the reported directories, which is why this did not show earlier. The first hit is BehindTheMusicTree/app-kit#624 (packages/app-kit/src/genre-tree/useRegionGenreLexicon.test.ts).Changes
coverage.yml: the check skips test files by name:.test./.spec.in the name, paths under__tests__/,test_*.py,*_test.py,*_test.go,conftest.py. Untested new source files are still flagged..github/tests/coverage.sh: scenarios for each test-file pattern, plus a new colocated source file and a source namedtesting.tsthat must still fail.Callers
This only removes false positives, and no caller needs a migration. app-kit bumps its pin in #624, and the other callers pick this up at their next pin update.
Validation
bash .github/tests/coverage.shpasses. With the fix reverted,new colocated .test. file is not flaggedfails, matching the app-kit error.actionlint .github/workflows/coverage.ymlpasses.