Skip to content

Commit

Permalink
Merge branch 'next' into better-webpack-stats-out
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Apr 22, 2021
2 parents 59024b7 + 88954b6 commit 218d363
Show file tree
Hide file tree
Showing 326 changed files with 53,863 additions and 37,542 deletions.
142 changes: 56 additions & 86 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

executors:
sb_node_10_classic:
sb_node_12_classic:
parameters:
class:
description: The Resource class
Expand All @@ -10,11 +10,11 @@ executors:
default: 'medium'
working_directory: /tmp/storybook
docker:
- image: circleci/node:10
- image: circleci/node:12
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_node_10_browsers:
sb_node_12_browsers:
parameters:
class:
description: The Resource class
Expand All @@ -23,11 +23,11 @@ executors:
default: 'medium'
working_directory: /tmp/storybook
docker:
- image: circleci/node:10-browsers
- image: circleci/node:12-browsers
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_node_12_browsers:
sb_cypress_6_node_12:
parameters:
class:
description: The Resource class
Expand All @@ -36,7 +36,9 @@ executors:
default: 'medium'
working_directory: /tmp/storybook
docker:
- image: circleci/node:12-browsers
# ⚠️ The Cypress docker image is based on Node.js one so be careful when updating it because it can also
# cause an upgrade of the Node.
- image: cypress/included:6.8.0
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
Expand All @@ -54,7 +56,7 @@ commands:
- run:
name: Check if PR is labeled with "<< parameters.label >>"
command: |
sudo apt-get install jq
apt-get -y install jq
PR_NUMBER=$(echo "$CIRCLE_PULL_REQUEST" | sed "s/.*\/pull\///")
echo "PR_NUMBER: $PR_NUMBER"
Expand All @@ -77,25 +79,25 @@ jobs:
build:
executor:
class: large
name: sb_node_10_classic
name: sb_node_12_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- restore_cache:
name: Restore Yarn cache
keys:
- build-yarn-cache-v4--{{ checksum "yarn.lock" }}
- build-yarn-2-cache-v1--{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
command: yarn install --immutable
- run:
name: Bootstrap
command: yarn bootstrap --core
- save_cache:
name: Save Yarn cache
key: build-yarn-cache-v4--{{ checksum "yarn.lock" }}
key: build-yarn-2-cache-v1--{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- ~/.yarn/berry/cache
- persist_to_workspace:
root: .
paths:
Expand All @@ -106,7 +108,7 @@ jobs:
- app
- lib
chromatic:
executor: sb_node_10_browsers
executor: sb_node_12_browsers
parallelism: 4
steps:
# Keep using default checkout because Chromatic needs some git history to work properly
Expand All @@ -120,7 +122,7 @@ jobs:
packtracker:
executor:
class: medium
name: sb_node_10_browsers
name: sb_node_12_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -134,7 +136,7 @@ jobs:
examples:
executor:
class: medium
name: sb_node_10_browsers
name: sb_node_12_browsers
parallelism: 4
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -152,7 +154,7 @@ jobs:
publish:
executor:
class: medium
name: sb_node_10_classic
name: sb_node_12_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -165,11 +167,10 @@ jobs:
root: .
paths:
- .verdaccio-cache
e2e-tests-node-10:
e2e-tests-extended:
executor:
class: medium
name: sb_node_10_browsers
working_directory: /tmp/storybook
name: sb_cypress_6_node_12
parallelism: 4
steps:
- when:
Expand All @@ -191,39 +192,23 @@ jobs:
command: yarn local-registry --port 6000 --open
background: true
- run:
name: wait for registry
name: Wait for registry
command: yarn wait-on http://localhost:6000
- run:
name: set registry
command: yarn config set registry http://localhost:6000/
- run:
name: test local registry
command: yarn info @storybook/core
- run:
name: Install Cypress binary
command: yarn cypress install
name: Set registry
command: yarn config set npmRegistryServer http://localhost:6000/
- run:
name: run e2e tests
command: yarn test:e2e-framework --skip preact
name: Run E2E tests
command: yarn test:e2e-framework --clean --skip angular@latest --skip vue3@next --skip web_components_typescript@latest --skip cra@latest
- store_artifacts:
path: /tmp/storybook/cypress
destination: cypress
e2e-tests-node-12:
e2e-tests-core:
executor:
class: medium
name: sb_node_12_browsers
working_directory: /tmp/storybook
name: sb_cypress_6_node_12
parallelism: 2
steps:
- when:
condition:
and:
- not:
equal: [ master, << pipeline.git.branch >> ]
- not:
equal: [ next, << pipeline.git.branch >> ]
steps:
- ensure-pr-is-labeled-with:
label: "run e2e extended test suite"
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
Expand All @@ -237,23 +222,18 @@ jobs:
command: yarn wait-on http://localhost:6000
- run:
name: Set registry
command: yarn config set registry http://localhost:6000/
- run:
name: Test local registry
command: yarn info @storybook/core
- run:
name: Install Cypress binary
command: yarn cypress install
command: yarn config set npmRegistryServer http://localhost:6000/
- run:
name: Run E2E tests
command: yarn test:e2e-framework preact
# Do not test CRA nor Web Components here because it's done in PnP part
command: yarn test:e2e-framework angular@latest vue3@next
- store_artifacts:
path: /tmp/storybook/cypress
destination: cypress
e2e-tests-cra-bench:
executor:
class: medium
name: sb_node_12_browsers
name: sb_cypress_6_node_12
working_directory: /tmp/storybook
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -269,57 +249,43 @@ jobs:
command: yarn wait-on http://localhost:6000
- run:
name: Set registry
command: yarn config set registry http://localhost:6000/
- run:
name: Test local registry
command: yarn info @storybook/core
- run:
name: Install Cypress binary
command: yarn cypress install
command: yarn config set npmRegistryServer http://localhost:6000/
- run:
name: Run @storybook/bench on a CRA project
command: yarn test:e2e-framework cra_bench
- store_artifacts:
path: /tmp/storybook/cypress
destination: cypress
e2e-tests-yarn-2-pnp:
e2e-tests-pnp:
executor:
class: medium
name: sb_node_10_browsers
name: sb_cypress_6_node_12
working_directory: /tmp/storybook
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: running local registry
name: Running local registry
command: yarn local-registry --port 6000 --open
background: true
- run:
name: wait for registry
name: Wait for registry
command: yarn wait-on http://localhost:6000
- run:
name: set registry
command: yarn config set registry http://localhost:6000/
- run:
name: test local registry
command: yarn info @storybook/core
- run:
name: Install Cypress binary
command: yarn cypress install
name: Set registry
command: yarn config set npmRegistryServer http://localhost:6000/
- run:
name: run e2e tests
command: yarn test:e2e-framework --use-yarn-2-pnp sfcVue cra
command: yarn test:e2e-framework --use-yarn-2-pnp sfcVue@latest cra@latest web_components_typescript@latest
- store_artifacts:
path: /tmp/storybook/cypress
destination: cypress
e2e-tests-examples:
working_directory: /tmp/storybook
docker:
- image: cypress/included:4.12.1
environment:
TERM: xterm
executor:
class: small
name: sb_cypress_6_node_12
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -341,7 +307,11 @@ jobs:
smoke-tests:
executor:
class: medium
name: sb_node_10_browsers
name: sb_node_12_browsers
environment:
# Disable ESLint when running smoke tests to improve perf + As of CRA 4.0.3, CRA kitchen sinks are throwing
# because of some ESLint warnings, related to: https://github.com/facebook/create-react-app/pull/10590
DISABLE_ESLINT_PLUGIN: 'true'
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand Down Expand Up @@ -408,20 +378,20 @@ jobs:
cd examples/cra-react15
yarn storybook --smoke-test --quiet
frontpage:
executor: sb_node_10_browsers
executor: sb_node_12_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- run:
name: Install dependencies
command: yarn bootstrap --install
command: yarn install --immutable
- run:
name: Trigger build
command: ./scripts/build-frontpage.js
lint:
executor:
class: small
name: sb_node_10_classic
name: sb_node_12_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -431,7 +401,7 @@ jobs:
name: Lint
command: yarn lint
unit-tests:
executor: sb_node_10_browsers
executor: sb_node_12_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand All @@ -447,7 +417,7 @@ jobs:
coverage:
executor:
class: small
name: sb_node_10_browsers
name: sb_node_12_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
Expand Down Expand Up @@ -488,13 +458,13 @@ workflows:
- publish:
requires:
- build
- e2e-tests-node-10:
- e2e-tests-extended:
requires:
- publish
- e2e-tests-node-12:
- e2e-tests-core:
requires:
- publish
- e2e-tests-yarn-2-pnp:
- e2e-tests-pnp:
requires:
- publish
- e2e-tests-cra-bench:
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.yarn/releases/yarn-*.js linguist-generated=true
/.yarn/** linguist-generated

0 comments on commit 218d363

Please sign in to comment.