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: Add index-json flag to test-runner script #28367

Merged
merged 16 commits into from
Jul 22, 2024

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Jun 27, 2024

Closes #

What I did

This PR adds the --index-json flag back to the test-runner scripts we use in CI. This flag was mistakenly removed and as a result we ended up not testing all stories.

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.5 MB 76.5 MB 0 B 0.97 0%
initSize 198 MB 198 MB 0 B 1.61 0%
diffSize 121 MB 121 MB 0 B 1.67 0%
buildSize 7.6 MB 7.6 MB 0 B 1.36 0%
buildSbAddonsSize 1.63 MB 1.63 MB 0 B 1.18 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.3 MB 2.3 MB 0 B 1.36 0%
buildSbPreviewSize 349 kB 349 kB 0 B 1.11 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.47 MB 4.47 MB 0 B 1.36 0%
buildPreviewSize 3.12 MB 3.12 MB 0 B 1 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 23.6s 11.4s -12s -158ms -0.39 -106.2%
generateTime 23.3s 24.2s 936ms 0.69 3.9%
initTime 24.7s 24.3s -427ms 0.17 -1.8%
buildTime 12.8s 15s 2.2s 0.34 14.8%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 9.3s 8.5s -824ms -0.33 -9.7%
devManagerResponsive 5.9s 5.6s -338ms -0.35 -6%
devManagerHeaderVisible 761ms 848ms 87ms 0.03 10.3%
devManagerIndexVisible 791ms 884ms 93ms 0.06 10.5%
devStoryVisibleUncached 1.1s 1.6s 511ms 1.49 🔺31.7%
devStoryVisible 825ms 909ms 84ms 0.06 9.2%
devAutodocsVisible 763ms 578ms -185ms -3.01 🔰-32%
devMDXVisible 814ms 809ms -5ms 0.84 -0.6%
buildManagerHeaderVisible 959ms 809ms -150ms -0.07 -18.5%
buildManagerIndexVisible 961ms 817ms -144ms -0.04 -17.6%
buildStoryVisible 1s 869ms -133ms -0.02 -15.3%
buildAutodocsVisible 891ms 748ms -143ms -0.22 -19.1%
buildMDXVisible 852ms 789ms -63ms 0.79 -8%

@yannbf yannbf added build Internal-facing build tooling & test updates ci:daily Run the CI jobs that normally run in the daily job. labels Jun 27, 2024
@yannbf yannbf force-pushed the yann/fix-test-runner-script branch from d6075d7 to 4823d9a Compare June 27, 2024 09:10
Copy link

nx-cloud bot commented Jun 27, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 505cfc7. 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.

PR Summary

  • Added --index-json flag to scripts/tasks/test-runner-build.ts to ensure all stories are tested
  • Added 'test-skip' tag to code/addons/interactions/template/stories/unhandled-errors.stories.ts
  • Added 'test-skip' tag to code/frameworks/nextjs/template/stories_nextjs-default-ts/ServerActions.stories.tsx

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

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.

PR Summary

(updates since last review)

  • Introduced runBeforeAllHook in code/core/src/preview-api/modules/preview-web/Preview.tsx
  • Added composeBeforeAllHooks utility in code/core/src/preview-api/modules/store/csf/beforeAll.ts
  • Added tests for composeBeforeAllHooks in code/core/src/preview-api/modules/store/csf/beforeAll.test.ts
  • Updated composeConfigs to support beforeAll hooks in code/core/src/preview-api/modules/store/csf/composeConfigs.ts
  • Removed node-fetch imports across multiple files, including scripts/package.json

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

@kasperpeulen kasperpeulen merged commit ea72ef3 into next Jul 22, 2024
104 checks passed
@kasperpeulen kasperpeulen deleted the yann/fix-test-runner-script branch July 22, 2024 07:25
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:daily Run the CI jobs that normally run in the daily job.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants