Skip to content

Commit

Permalink
Merge branch 'next' into shilman/upgrade-test-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Oct 8, 2022
2 parents 1017241 + aef3aaf commit 962ed90
Show file tree
Hide file tree
Showing 243 changed files with 3,040 additions and 5,073 deletions.
199 changes: 13 additions & 186 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ executors:
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_cypress_8_node_14:
parameters:
class:
description: The Resource class
type: enum
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'medium'
working_directory: /tmp/storybook
docker:
# ⚠️ The Cypress docker image is based on Node.js one so be careful when updating it because it can also
# cause an upgrade of Node.js version too. Cypress 8.5 image is based on Node.js 14
- image: cypress/included:8.7.0
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
sb_playwright:
parameters:
class:
Expand Down Expand Up @@ -184,85 +169,6 @@ jobs:
root: .
paths:
- .verdaccio-cache
e2e-tests-extended:
executor:
class: medium
name: sb_cypress_8_node_14
parallelism: 14
steps:
- when:
condition:
and:
- not:
equal: [main, << 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:
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: Run E2E (extended) tests
command: |
cd code
yarn test:e2e-framework --clean --all --skip angular --skip angular12 --skip vue3 --skip web_components_typescript --skip cra --skip react
no_output_timeout: 5m
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
e2e-tests-core:
executor:
class: large
name: sb_cypress_8_node_14
parallelism: 8
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: Run E2E (core) tests
# Do not test CRA here because it's done in PnP part
# TODO: Remove `web_components_typescript` as soon as Lit 2 stable is released
command: |
cd code
yarn test:e2e-framework vue3 angular130 angular13 angular12 web_components_typescript web_components_lit2 react react_legacy_root_api
no_output_timeout: 5m
- run:
name: prep artifacts
when: always
command: zip -r /tmp/storybook-e2e-testing-out.zip /tmp/storybook-e2e-testing
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
- store_artifacts:
path: /tmp/storybook-e2e-testing-out.zip
destination: e2e
# NOTE: this currently tests each story in docs mode, which doesn't make sense any more as stories
# can no longer run in docs mode. Instead we should probably change the test runner to test each
# docs entry if you run it in `VIEW_MODE=docs`
Expand Down Expand Up @@ -325,73 +231,6 @@ jobs:
- store_artifacts:
path: /tmp/sb-bench.tar.gz
destination: sb-bench.tar.gz
e2e-tests-pnp:
executor:
class: medium
name: sb_cypress_8_node_14
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: run e2e tests cra
command: |
cd code
yarn test:e2e-framework --pnp cra
# - run:
# name: run e2e tests vue
# command: yarn test:e2e-framework --pnp sfcVue
- run:
name: prep artifacts
when: always
command: zip -r /tmp/storybook-e2e-testing-out.zip /tmp/storybook-e2e-testing
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
- store_artifacts:
path: /tmp/storybook-e2e-testing-out.zip
destination: e2e
e2e-tests-examples:
executor:
class: small
name: sb_cypress_8_node_14
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: running example
command: |
cd code
yarn serve-storybooks
background: true
- run:
name: await running examples
command: |
cd code
yarn await-serve-storybooks
- run:
name: cypress run
command: |
cd code
yarn test:e2e-examples
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
smoke-tests:
executor:
class: medium+
Expand Down Expand Up @@ -477,15 +316,15 @@ jobs:
executor:
class: medium+
name: sb_node_14_browsers
parallelism: 10
parallelism: 12
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Creating Sandboxes
command: yarn task --task create --template $(yarn get-template ci) --force --no-before --junit
command: yarn task --task create --template $(yarn get-template ci create) --force --no-before --junit
working_directory: code
- persist_to_workspace:
root: .
Expand All @@ -497,83 +336,83 @@ jobs:
executor:
class: medium+
name: sb_node_14_browsers
parallelism: 10
parallelism: 12
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Smoke Testing Sandboxes
command: yarn task --task smoke-test --template $(yarn get-template ci) --force --no-before --junit
command: yarn task --task smoke-test --template $(yarn get-template ci smoke-test) --force --no-before --junit
working_directory: code
- store_test_results:
path: code/test-results
build-sandboxes:
executor:
class: medium+
name: sb_node_14_browsers
parallelism: 10
parallelism: 12
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Building Sandboxes
command: yarn task --task build --template $(yarn get-template ci) --force --no-before --junit
command: yarn task --task build --template $(yarn get-template ci build) --force --no-before --junit
working_directory: code
- store_test_results:
path: code/test-results
- persist_to_workspace:
root: .
paths:
- sandbox
- sandbox/*/storybook-static
test-runner-sandboxes:
executor:
class: medium+
name: sb_node_14_browsers
parallelism: 10
parallelism: 12
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running Test Runner
command: yarn task --task test-runner --template $(yarn get-template ci) --force --no-before --junit
command: yarn task --task test-runner --template $(yarn get-template ci test-runner) --force --no-before --junit
working_directory: code
- store_test_results:
path: code/test-results
chromatic-sandboxes:
executor:
class: medium+
name: sb_node_14_browsers
parallelism: 10
parallelism: 12
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running Chromatic
command: yarn task --task chromatic --template $(yarn get-template ci) --force --no-before --junit
command: yarn task --task chromatic --template $(yarn get-template ci chromatic) --force --no-before --junit
working_directory: code
- store_test_results:
path: code/test-results
e2e-sandboxes:
executor:
class: medium+
name: sb_playwright
parallelism: 10
parallelism: 12
steps:
- git-shallow-clone/checkout_advanced:
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running E2E Tests
command: yarn task --task e2e-tests --template $(yarn get-template ci) --force --no-before --junit
command: yarn task --task e2e-tests --template $(yarn get-template ci e2e-tests) --force --no-before --junit
working_directory: code
- store_test_results:
path: code/test-results
Expand All @@ -591,9 +430,6 @@ workflows:
- examples:
requires:
- build
- e2e-tests-examples:
requires:
- examples
- smoke-tests:
requires:
- build
Expand All @@ -612,15 +448,6 @@ workflows:
- publish:
requires:
- build
- e2e-tests-extended:
requires:
- publish
- e2e-tests-core:
requires:
- publish
- e2e-tests-pnp:
requires:
- publish
- cra-bench:
requires:
- publish
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/generate-repros-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
branches:
- vite-frameworks-xyz
- norbert/sb-524-webpack5react18ts
- norbert/sb-525-webpack5react17js

jobs:
generate:
Expand Down
15 changes: 3 additions & 12 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
# and commit this file to your remote git repository to share the goodness with others.

tasks:
- name: Scripts
init: |
cd scripts
yarn install
gp sync-done scripts
- name: Code
init: |
gp sync-await scripts # wait for the above 'init' to finish
cd code
yarn install
yarn bootstrap --core

- name: Bootstrap
init: ./bootstrap.sh --core
Loading

0 comments on commit 962ed90

Please sign in to comment.