-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude unnecessarily tracked coverage files #30639
base: next
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
'**/src/**/!(stories)/**', | ||
'**/src/**/*.stories.*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: The pattern **/src/**/!(stories)/**
may be too aggressive - it excludes all source code except stories directories which could hide actual coverage gaps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unsure how to get around this. It is including src/ top level directory, which is artificially lowering the coverage test. I want it to exclude src/ but include everything inside src/ (that pertains to testing). Should we have a set directory that these files are expected to go into and have that in documentation, or is there a better way to approach this?
f3bd53c
to
23ff769
Compare
23ff769
to
93485f6
Compare
Closes #30525
What I did
Glob excluded certain files that test coverage was unnecessarily including, which was causing coverage to incorrectly report dramatically lower than its true results.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Before changes:
After changes:
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/core
team here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>
Greptile Summary
Based on the provided information, I'll create a concise summary of the pull request:
Updates test coverage configuration to exclude non-source files from coverage calculations, providing more accurate coverage metrics in Storybook Test addon.
code/addons/test/src/node/vitest-manager.ts
for.storybook
, story files, and build artifactsstorybook-static
was incorrectly included in coverage💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!