Skip to content

Commit

Permalink
Merge pull request #19558 from storybookjs/shilman/benchmark-vite
Browse files Browse the repository at this point in the history
Add vite-react benchmark
  • Loading branch information
shilman authored Oct 22, 2022
2 parents 42e1d5c + cd77a19 commit 0760956
Showing 1 changed file with 47 additions and 3 deletions.
50 changes: 47 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,61 @@ jobs:
name: set up cra repro, skip tests
command: |
cd code
node ./lib/cli/bin/index.js repro -t cra --e2e ../../cra-bench
node ./lib/cli/bin/index.js repro-next cra/default-js --output ../../cra-bench
- run:
name: Run @storybook/bench on repro
command: |
cd ../cra-bench
npx -p @storybook/bench@0.7.6--canary.760ff01.0 sb-bench 'echo noop' --label cra
rm -rf node_modules
mkdir node_modules
npx -p @storybook/bench@0.7.6--canary.14.6702e4f.0 sb-bench 'yarn install' --label cra
- run:
name: prep artifacts
when: always
command: tar cvzf /tmp/sb-bench.tar.gz ../cra-bench
- store_artifacts:
path: /tmp/sb-bench.tar.gz
destination: sb-bench.tar.gz
react-vite-bench:
executor:
class: medium+
name: sb_playwright
working_directory: /tmp/storybook
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running local registry
command: |
cd code
yarn local-registry --port 6001 --open
background: true
- run:
name: Wait for registry
command: |
cd code
yarn wait-on http://localhost:6001
- run:
name: set up react-vite repro, skip tests
command: |
cd code
node ./lib/cli/bin/index.js repro-next react-vite/default-ts --output ../../react-vite-bench
- run:
name: Run @storybook/bench on repro
command: |
cd ../react-vite-bench
rm -rf node_modules
mkdir node_modules
npx -p @storybook/bench@0.7.6--canary.14.6702e4f.0 sb-bench 'yarn install' --label react-vite
- run:
name: prep artifacts
when: always
command: tar cvzf /tmp/sb-bench.tar.gz ../react-vite-bench
- store_artifacts:
path: /tmp/sb-bench.tar.gz
destination: sb-bench.tar.gz
smoke-tests:
executor:
class: medium+
Expand Down Expand Up @@ -454,7 +496,9 @@ workflows:
- cra-bench:
requires:
- publish

- react-vite-bench:
requires:
- publish
## new workflow
- create-sandboxes:
requires:
Expand Down

0 comments on commit 0760956

Please sign in to comment.