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

Addon Test: Add Vitest 3 support #30181

Merged
merged 26 commits into from
Jan 15, 2025
Merged

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Jan 3, 2025

Closes #

What I did

  • Added compatibility for @storybook/experimental-addon-test to support Vitest 3
  • Updated the mono repository to use the latest Vitest 3 beta and updated tests to make them compatible with Vitest 3

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-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 pull request has been released as version 0.0.0-pr-30181-sha-2fdb0bfe. Try it out in a new sandbox by running npx storybook@0.0.0-pr-30181-sha-2fdb0bfe sandbox or in an existing project with npx storybook@0.0.0-pr-30181-sha-2fdb0bfe upgrade.

More information
Published version 0.0.0-pr-30181-sha-2fdb0bfe
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/add-vitest-3-support
Commit 2fdb0bfe
Datetime Wed Jan 15 08:40:37 UTC 2025 (1736930437)
Workflow run 12784527795

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=30181

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.9 MB 77.9 MB 0 B 1.38 0%
initSize 131 MB 131 MB 24 B 1.34 0%
diffSize 52.9 MB 52.9 MB 24 B -0.74 0%
buildSize 7.19 MB 7.19 MB 0 B 1.72 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B -1 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B 2 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B 1.56 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B 1.73 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 16.7s 18.3s 1.5s 0.56 8.3%
generateTime 20.6s 22.1s 1.4s 0.88 6.6%
initTime 14.6s 16.4s 1.7s 1.6 🔺10.7%
buildTime 9.3s 8.4s -826ms -0.96 -9.7%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.8s 4.4s -324ms -1.21 -7.2%
devManagerResponsive 3.6s 3.2s -369ms -1.35 🔰-11.2%
devManagerHeaderVisible 615ms 526ms -89ms -1.28 🔰-16.9%
devManagerIndexVisible 646ms 557ms -89ms -1.33 🔰-16%
devStoryVisibleUncached 1.2s 1.9s 637ms 0.28 33.2%
devStoryVisible 647ms 558ms -89ms -1.37 🔰-15.9%
devAutodocsVisible 506ms 506ms 0ms -0.72 0%
devMDXVisible 533ms 504ms -29ms -0.81 -5.8%
buildManagerHeaderVisible 604ms 552ms -52ms -0.54 -9.4%
buildManagerIndexVisible 682ms 644ms -38ms -0.43 -5.9%
buildStoryVisible 575ms 539ms -36ms -0.51 -6.7%
buildAutodocsVisible 449ms 425ms -24ms -1.03 -5.6%
buildMDXVisible 489ms 427ms -62ms -0.99 -14.5%

@valentinpalkovic valentinpalkovic changed the base branch from next to valentin/a11y-refactorings January 3, 2025 11:00
@valentinpalkovic valentinpalkovic self-assigned this Jan 3, 2025
@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @valentinpalkovic. See the failed workflow run at: /~https://github.com/storybookjs/storybook/actions/runs/12596687166

@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @valentinpalkovic. See the failed workflow run at: /~https://github.com/storybookjs/storybook/actions/runs/12596812168

Copy link

nx-cloud bot commented Jan 3, 2025

View your CI Pipeline Execution ↗ for commit f4373a5.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 9s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-15 12:02:52 UTC

@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @valentinpalkovic. See the failed workflow run at: /~https://github.com/storybookjs/storybook/actions/runs/12596958152

@valentinpalkovic valentinpalkovic added bug ci:daily Run the CI jobs that normally run in the daily job. labels Jan 3, 2025
Base automatically changed from valentin/a11y-refactorings to next January 13, 2025 09:32
@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Jan 13, 2025

Package Benchmarks

Commit: f4373a5, ran on 15 January 2025 at 12:09:28 UTC

The following packages have significant changes to their size or dependencies:

@storybook/experimental-addon-test

Before After Difference
Dependency count 60 60 0
Self size 762 KB 832 KB 🚨 +70 KB 🚨
Dependency size 14.15 MB 14.15 MB 🚨 +18 B 🚨
Bundle Size Analyzer Link Link

@@ -96,7 +96,7 @@ describe('eslint-plugin fix', () => {
});

describe('should install eslint plugin', () => {
it('when .eslintrc is using a supported extension', async () => {
it.skip('when .eslintrc is using a supported extension', async () => {
Copy link
Contributor Author

@valentinpalkovic valentinpalkovic Jan 13, 2025

Choose a reason for hiding this comment

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

I may need some help from @yannbf figuring out why, in Vitest 3, these tests are failing.

@valentinpalkovic valentinpalkovic added ci:normal and removed ci:daily Run the CI jobs that normally run in the daily job. labels Jan 13, 2025
@valentinpalkovic
Copy link
Contributor Author

Currently blocked by vitest-dev/vitest#7212

@valentinpalkovic valentinpalkovic merged commit b16498b into next Jan 15, 2025
60 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/add-vitest-3-support branch January 15, 2025 12:21
@github-actions github-actions bot mentioned this pull request Jan 15, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants