Skip to content
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

Build: Use !test tag to disable test-runner tests #28747

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Jul 29, 2024

Closes #

What I did

The Storybook test-runner now uses test as default tags, so we now remove the old ways of filtering tests and use the !test tag instead

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/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>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 76.4 MB 76.4 MB 0 B -0.51 0%
initSize 198 MB 198 MB 0 B 2.09 0%
diffSize 122 MB 122 MB 0 B 2.29 0%
buildSize 7.6 MB 7.6 MB 0 B 4.33 0%
buildSbAddonsSize 1.63 MB 1.63 MB 0 B 3 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.3 MB 2.3 MB 0 B - 0%
buildSbPreviewSize 349 kB 349 kB 0 B - 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.47 MB 4.47 MB 0 B 3 0%
buildPreviewSize 3.12 MB 3.12 MB 0 B 4.36 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 7.7s 7s -758ms -0.93 -10.8%
generateTime 28.4s 22.4s -5s -978ms -0.01 -26.6%
initTime 26s 23s -3s -21ms 0.18 -13.1%
buildTime 14.4s 17.7s 3.3s 3.04 🔺19%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 9.9s 8.4s -1s -438ms -0.38 -17%
devManagerResponsive 6s 5.6s -352ms -0.37 -6.2%
devManagerHeaderVisible 970ms 862ms -108ms -0.22 -12.5%
devManagerIndexVisible 997ms 891ms -106ms -0.24 -11.9%
devStoryVisibleUncached 1.4s 1.2s -198ms -0.86 -16.2%
devStoryVisible 1s 914ms -104ms -0.28 -11.4%
devAutodocsVisible 823ms 772ms -51ms -0.29 -6.6%
devMDXVisible 880ms 684ms -196ms -0.87 -28.7%
buildManagerHeaderVisible 894ms 809ms -85ms -0.26 -10.5%
buildManagerIndexVisible 897ms 814ms -83ms -0.28 -10.2%
buildStoryVisible 968ms 858ms -110ms -0.32 -12.8%
buildAutodocsVisible 821ms 699ms -122ms -0.71 -17.5%
buildMDXVisible 742ms 678ms -64ms -0.54 -9.4%

Greptile Summary

Updated the Storybook test-runner to use the !test tag for excluding tests, replacing the old filtering methods.

  • Updated code/addons/docs/template/stories/docspage/error.stories.ts to use !test tag for excluding stories from test runs.
  • Replaced test-skip with !test in code/addons/interactions/template/stories/unhandled-errors.stories.ts.
  • Simplified test exclusion in code/core/template/stories/rendering.stories.ts using the !test tag.
  • Modified code/frameworks/nextjs/template/stories/RSC.stories.jsx to align with the new tagging system.
  • Removed --skipTags="test-skip" flag in scripts/tasks/test-runner-build.ts to adopt the new tagging approach.

@yannbf yannbf added build Internal-facing build tooling & test updates ci:merged Run the CI jobs that normally run when merged. labels Jul 29, 2024
Copy link

nx-cloud bot commented Jul 29, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 04c4751. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

15 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@yannbf yannbf merged commit c1e91ed into next Jul 29, 2024
66 checks passed
@yannbf yannbf deleted the yann/use-disable-tags-in-test-runner-tests branch July 29, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:merged Run the CI jobs that normally run when merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants