Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/next' into fork/tob…
Browse files Browse the repository at this point in the history
…iasdiez/vite-remove-fs
  • Loading branch information
kasperpeulen committed Dec 3, 2024
2 parents 1549073 + a8ad83f commit 8936c5f
Show file tree
Hide file tree
Showing 1,352 changed files with 38,757 additions and 6,473 deletions.
172 changes: 151 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ executors:
default: "small"
working_directory: /tmp/storybook
docker:
- image: mcr.microsoft.com/playwright:v1.46.0-jammy
- image: mcr.microsoft.com/playwright:v1.48.1-jammy
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
cd code
yarn local-registry --publish
- report-workflow-on-failure
- store_artifacts:
- store_artifacts:
path: code/bench/esbuild-metafiles
- save_cache:
name: Save Yarn cache
Expand All @@ -165,17 +165,15 @@ jobs:
root: .
paths:
- code/node_modules
- code/addons
- scripts/node_modules
- code/bench
- code/examples
- code/node_modules
- code/addons
- code/frameworks
- code/deprecated
- code/lib
- code/core
- code/builders
- code/ui
- code/renderers
- code/presets
- .verdaccio-cache
Expand Down Expand Up @@ -211,23 +209,88 @@ jobs:
yarn knip --no-exit-code
- report-workflow-on-failure
- cancel-workflow-on-failure
check:
bench-packages:
executor:
class: xlarge
class: medium
name: sb_node_22_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
# if there is a base branch AND a PR number in parameters, benchmark packages against those
# this happens when run against a PR
- when:
condition:
and:
- << pipeline.parameters.ghBaseBranch >>
- << pipeline.parameters.ghPrNumber >>
steps:
- run:
name: Benchmarking packages against base branch
working_directory: scripts
command: |
yarn local-registry --open &
until curl -s http://localhost:6001 > /dev/null; do
echo 'Waiting for local registry to be available...'
sleep 2
done
yarn bench-packages --base-branch << pipeline.parameters.ghBaseBranch >> --pull-request << pipeline.parameters.ghPrNumber >> --upload
# if there is a NOT a base branch OR NOT a PR number in parameters, just upload benchmarks for the branch
# this happens when runned directly on branches, like next or main
- when:
condition:
or:
- not: << pipeline.parameters.ghBaseBranch >>
- not: << pipeline.parameters.ghPrNumber >>
steps:
- run:
name: Uploading package benchmarks for branch
working_directory: scripts
command: |
yarn local-registry --open &
until curl -s http://localhost:6001 > /dev/null; do
echo 'Waiting for local registry to be available...'
sleep 2
done
yarn bench-packages --upload
- store_artifacts:
path: bench/packages/results.json
- store_artifacts:
path: bench/packages/compare-with-<< pipeline.parameters.ghBaseBranch >>.json
- report-workflow-on-failure
- cancel-workflow-on-failure
check:
executor:
class: xlarge
name: sb_node_22_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- nx/set-shas:
main-branch-name: "next"
workflow-name: << pipeline.parameters.workflow >>
- run:
name: install in scripts
command: |
cd scripts
yarn install
- run:
name: install in code
command: |
cd code
yarn install
- run:
name: Compile
command: |
yarn task --task compile --start-from=compile --no-link --debug
- run:
name: Check
command: |
yarn task --task compile --start-from=auto --no-link --debug
yarn task --task check --start-from=auto --no-link --debug
yarn task --task check --start-from=check --no-link --debug
- run:
name: Ensure no changes pending
command: |
git diff --exit-code
- report-workflow-on-failure
- cancel-workflow-on-failure
Expand Down Expand Up @@ -261,6 +324,7 @@ jobs:
executor:
class: xlarge
name: sb_playwright
parallelism: 4
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -270,15 +334,35 @@ jobs:
name: Test
command: |
cd code
yarn test --coverage
- store_test_results:
path: code/junit.xml
SHARD="$((${CIRCLE_NODE_INDEX}+1))"; yarn test --reporter=blob --shard=${SHARD}/${CIRCLE_NODE_TOTAL}
# TODO: bring coverage back later. This has caused flakiness in the tests because
# Somehow Vitest reports coverage while some tests are still running,
# then it tries to report coverage again and as result it crashes like this:
# https://app.circleci.com/pipelines/github/storybookjs/storybook/85043/workflows/4ddf7907-b93c-4b17-8fdf-fe0bd7fde905/jobs/715446
# - persist_to_workspace:
# root: .
# paths:
# - code/coverage
- persist_to_workspace:
root: .
paths:
- code/coverage
- code/.vitest-reports
- report-workflow-on-failure
- cancel-workflow-on-failure
store-test-results:
executor:
class: small
name: sb_node_22_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Merge test results
command: cd code && yarn vitest run --merge-reports --reporter=junit --outputFile=junit.xml
- store_test_results:
path: code/junit.xml
coverage:
executor:
class: small
Expand Down Expand Up @@ -522,7 +606,7 @@ jobs:
- store_artifacts: # this is where playwright puts more complex stuff
path: code/playwright-results/
destination: playwright
bench:
bench-sandboxes:
parameters:
parallelism:
type: integer
Expand Down Expand Up @@ -654,6 +738,31 @@ jobs:
STORYBOOK_INIT_EMPTY_TYPE: << parameters.template >>
STORYBOOK_DISABLE_TELEMETRY: true
- report-workflow-on-failure
test-ui-testing-module:
executor:
name: sb_playwright
class: medium
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Install dependencies
command: yarn install --no-immutable
working_directory: test-storybooks/portable-stories-kitchen-sink/react
environment:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- run:
name: Run E2E tests
command: yarn playwright-e2e
working_directory: test-storybooks/portable-stories-kitchen-sink/react
- store_test_results:
path: test-results
- store_artifacts:
path: test-storybooks/portable-stories-kitchen-sink/react/test-results/
destination: playwright
- report-workflow-on-failure
test-portable-stories:
parameters:
directory:
Expand Down Expand Up @@ -682,7 +791,7 @@ jobs:
working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>
- run:
name: Run Playwright CT tests
command: yarn playwright
command: yarn playwright-ct
working_directory: test-storybooks/portable-stories-kitchen-sink/<< parameters.directory >>
- run:
name: Run Cypress CT tests
Expand All @@ -707,12 +816,16 @@ workflows:
- knip:
requires:
- build
- check:
- bench-packages:
requires:
- build
- check
- unit-tests:
requires:
- build
- store-test-results:
requires:
- unit-tests
- script-checks:
requires:
- build
Expand Down Expand Up @@ -750,10 +863,13 @@ workflows:
parallelism: 5
requires:
- create-sandboxes
- bench:
- bench-sandboxes:
parallelism: 5
requires:
- build-sandboxes
- test-ui-testing-module:
requires:
- build
- test-portable-stories:
requires:
- build
Expand All @@ -776,12 +892,16 @@ workflows:
- knip:
requires:
- build
- check:
- bench-packages:
requires:
- build
- check
- unit-tests:
requires:
- build
- store-test-results:
requires:
- unit-tests
- script-checks:
requires:
- build
Expand Down Expand Up @@ -825,7 +945,10 @@ workflows:
matrix:
parameters:
directory: ["react", "vue3", "nextjs", "svelte"]
- bench:
- test-ui-testing-module:
requires:
- build
- bench-sandboxes:
parallelism: 5
requires:
- build-sandboxes
Expand All @@ -846,12 +969,16 @@ workflows:
- knip:
requires:
- build
- check:
- bench-packages:
requires:
- build
- check
- unit-tests:
requires:
- build
- store-test-results:
requires:
- unit-tests
- script-checks:
requires:
- build
Expand Down Expand Up @@ -895,6 +1022,9 @@ workflows:
matrix:
parameters:
directory: ["react", "vue3", "nextjs", "svelte"]
- test-ui-testing-module:
requires:
- build
- test-empty-init:
requires:
- build
Expand All @@ -913,7 +1043,7 @@ workflows:
# --smoke-test is not supported for the angular builder right now
# - "angular-cli"
- "lit-vite-ts"
- bench:
- bench-sandboxes:
parallelism: 5
requires:
- build-sandboxes
Expand Down
25 changes: 13 additions & 12 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Thank you for contributing to Storybook! Please submit all PRs to the `next` bra
<!-- Please check (put an "x" inside the "[ ]") the applicable items below to communicate how to test your changes -->

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

- [ ] stories
- [ ] unit tests
- [ ] integration tests
Expand Down Expand Up @@ -46,21 +47,21 @@ _This section is mandatory for all contributions. If you believe no manual test

## 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`
- [ ] 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:
<details>
<summary>Available labels</summary>

- `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.
- `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.

</details>

### 🦋 Canary release
Expand All @@ -74,4 +75,4 @@ _core team members can create a canary release [here](https://github.com/storybo
<!-- CANARY_RELEASE_SECTION -->

<!-- BENCHMARK_SECTION -->
<!-- BENCHMARK_SECTION -->
<!-- BENCHMARK_SECTION -->
2 changes: 1 addition & 1 deletion .github/workflows/generate-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: next

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
Expand Down
Loading

0 comments on commit 8936c5f

Please sign in to comment.