Skip to content

Commit

Permalink
Merge branch 'next' into feat/addons-controls-tsup
Browse files Browse the repository at this point in the history
# Conflicts:
#	code/addons/controls/package.json
  • Loading branch information
ndelangen committed Jul 26, 2022
2 parents c5ecac9 + 7035ea7 commit 8bbef0a
Show file tree
Hide file tree
Showing 3,330 changed files with 27,210 additions and 5,696 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .ci/danger/dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const flatten = require('lodash/flatten');
const intersection = require('lodash/intersection');
const isEmpty = require('lodash/isEmpty');

const pkg = require('../../package.json'); // eslint-disable-line import/newline-after-import
const pkg = require('../../code/package.json'); // eslint-disable-line import/newline-after-import
const prLogConfig = pkg['pr-log'];

const Versions = {
Expand Down
126 changes: 90 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ executors:
default: 'medium'
working_directory: /tmp/storybook
docker:
- image: circleci/node:14
- image: cimg/node:14.19
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
Expand All @@ -23,7 +23,7 @@ executors:
default: 'medium'
working_directory: /tmp/storybook
docker:
- image: circleci/node:14-browsers
- image: cimg/node:14.19-browsers
environment:
NODE_OPTIONS: --max_old_space_size=3076
resource_class: <<parameters.class>>
Expand All @@ -45,6 +45,7 @@ executors:

orbs:
git-shallow-clone: guitarrapc/git-shallow-clone@2.0.3
browser-tools: circleci/browser-tools@1.4.0

commands:
ensure-pr-is-labeled-with:
Expand Down Expand Up @@ -86,30 +87,40 @@ jobs:
- restore_cache:
name: Restore Yarn cache
keys:
- build-yarn-2-cache-v3--{{ checksum "yarn.lock" }}
- build-yarn-2-cache-v3--{{ checksum "code/yarn.lock" }}
- run:
name: Install dependencies
command: yarn install --immutable
command: |
cd code
yarn install --immutable
- run:
name: Install script dependencies
command: |
cd scripts
yarn install --immutable
- run:
name: Bootstrap
command: |
cd code
yarn bootstrap --build
git diff --exit-code
- save_cache:
name: Save Yarn cache
key: build-yarn-2-cache-v3--{{ checksum "yarn.lock" }}
key: build-yarn-2-cache-v3--{{ checksum "code/yarn.lock" }}
paths:
- ~/.yarn/berry/cache
- persist_to_workspace:
root: .
paths:
- examples
- node_modules
- addons
- frameworks
- lib
- renderers
- presets
- code/node_modules
- scripts/node_modules
- code/examples
- code/node_modules
- code/addons
- code/frameworks
- code/lib
- code/renderers
- code/presets
chromatic:
executor: sb_node_14_browsers
parallelism: 15
Expand All @@ -121,6 +132,7 @@ jobs:
- run:
name: chromatic
command: |
cd code
yarn run-chromatics
examples:
executor:
Expand All @@ -135,11 +147,12 @@ jobs:
- run:
name: examples
command: |
cd code
yarn build-storybooks --all
- persist_to_workspace:
root: .
paths:
- built-storybooks
- code/built-storybooks
publish:
executor:
class: medium
Expand All @@ -151,7 +164,9 @@ jobs:
at: .
- run:
name: running local registry
command: yarn local-registry --publish
command: |
cd code
yarn local-registry --publish
- persist_to_workspace:
root: .
paths:
Expand All @@ -178,14 +193,20 @@ jobs:
at: .
- run:
name: running local registry
command: yarn local-registry --port 6000 --open
command: |
cd code
yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
command: |
cd code
yarn wait-on http://localhost:6000
- run:
name: Run E2E (extended) tests
command: yarn test:e2e-framework --clean --all --skip angular --skip angular12 --skip vue3 --skip web_components_typescript --skip cra --skip react
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
Expand All @@ -202,16 +223,22 @@ jobs:
at: .
- run:
name: Running local registry
command: yarn local-registry --port 6000 --open
command: |
cd code
yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
command: |
cd code
yarn wait-on http://localhost:6000
- 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: yarn test:e2e-framework vue3 angular130 angular13 angular12 web_components_typescript web_components_lit2 react react_legacy_root_api
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
Expand Down Expand Up @@ -259,21 +286,29 @@ jobs:
at: .
- run:
name: install playright
command: npx playwright install
command: |
cd code
npx playwright install
- run:
name: Running local registry
command: yarn local-registry --port 6000 --open
command: |
cd code
yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
command: |
cd code
yarn wait-on http://localhost:6000
- run:
name: set up cra repro, skip tests
command: node ./lib/cli/bin/index.js repro -t cra --e2e ../cra-bench
command: |
cd code
node ./lib/cli/bin/index.js repro -t cra --e2e ../cra-bench
- run:
name: Run @storybook/bench on repro
command: |
cd ../cra-bench
cd ./cra-bench
npx @storybook/bench@1.0.0--canary.11.52d1ee7.1 'echo noop' --label cra
e2e-tests-pnp:
executor:
Expand All @@ -287,14 +322,20 @@ jobs:
at: .
- run:
name: Running local registry
command: yarn local-registry --port 6000 --open
command: |
cd code
yarn local-registry --port 6000 --open
background: true
- run:
name: Wait for registry
command: yarn wait-on http://localhost:6000
command: |
cd code
yarn wait-on http://localhost:6000
- run:
name: run e2e tests cra
command: yarn test:e2e-framework --pnp cra
command: |
cd code
yarn test:e2e-framework --pnp cra
# - run:
# name: run e2e tests vue
# command: yarn test:e2e-framework --pnp sfcVue
Expand All @@ -319,14 +360,20 @@ jobs:
at: .
- run:
name: running example
command: yarn serve-storybooks
command: |
cd code
yarn serve-storybooks
background: true
- run:
name: await running examples
command: yarn await-serve-storybooks
command: |
cd code
yarn await-serve-storybooks
- run:
name: cypress run
command: yarn test:e2e-examples
command: |
cd code
yarn test:e2e-examples
- store_artifacts:
path: /tmp/cypress-record
destination: cypress
Expand All @@ -347,6 +394,7 @@ jobs:
- run:
name: smoke tests
command: |
cd code
yarn smoketest-storybooks --all
lint:
executor:
Expand All @@ -359,7 +407,9 @@ jobs:
at: .
- run:
name: Lint
command: yarn lint
command: |
cd code
yarn lint
unit-tests:
executor: sb_node_14_browsers
steps:
Expand All @@ -369,13 +419,15 @@ jobs:
at: .
- run:
name: Test
command: yarn test --coverage --runInBand --ci
command: |
cd code
yarn test --coverage --runInBand --ci
- store_test_results:
path: junit.xml
path: code/junit.xml
- persist_to_workspace:
root: .
paths:
- coverage
- code/coverage
coverage:
executor:
class: small
Expand All @@ -387,7 +439,9 @@ jobs:
at: .
- run:
name: Upload coverage
command: yarn coverage
command: |
cd code
yarn coverage
workflows:
test:
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/.yarn/** linguist-generated
/**/.yarn/** linguist-generated
48 changes: 24 additions & 24 deletions .github/autolabeler.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
'addon: a11y': ["addons/a11y/**"]
'addon: actions': ["addons/actions/**"]
'addon: backgrounds': ["addons/backgrounds/**"]
'addon: events ': ["addons/events/**"]
'addon: graphql ': ["addons/graphql/**"]
'addon: info': ["addons/info/**"]
'addon: jest': ["addons/jest/**"]
'addon: knobs': ["addons/knobs/**"]
'addon: links': ["addons/links/**"]
'addon: notes': ["addons/notes/**"]
'addon: options': ["addons/options/**"]
'addon: storyshots': ["addons/storyshots/**"]
'addon: viewport': ["addons/viewport/**"]
'app: angular': ["app/angular/**"]
'app: preact': ["app/preact/**"]
'app: rax': ["app/rax/**"]
'app: react': ["app/react/**"]
'app: vue': ["app/vue/**"]
'app: svelte': ["app/svelte/**"]
'app: mithril': ["app/mithril/**"]
'babel / webpack': ["webpack", "babel"]
'cli': ["lib/cli/**"]
'addon: a11y': ['addons/a11y/**']
'addon: actions': ['addons/actions/**']
'addon: backgrounds': ['addons/backgrounds/**']
'addon: events ': ['addons/events/**']
'addon: graphql ': ['addons/graphql/**']
'addon: info': ['addons/info/**']
'addon: jest': ['addons/jest/**']
'addon: knobs': ['addons/knobs/**']
'addon: links': ['addons/links/**']
'addon: notes': ['addons/notes/**']
'addon: options': ['addons/options/**']
'addon: storyshots': ['addons/storyshots/**']
'addon: viewport': ['addons/viewport/**']
'app: angular': ['app/angular/**']
'app: preact': ['app/preact/**']
'app: rax': ['app/rax/**']
'app: react': ['app/react/**']
'app: vue': ['app/vue/**']
'app: svelte': ['app/svelte/**']
'app: mithril': ['app/mithril/**']
'babel / webpack': ['webpack', 'babel']
'cli': ['lib/cli/**']
'compatibility with other tools': []
'documentation': ["docs", "*.md"]
'ui': ["lib/ui"]
'documentation': ['docs', '*.md']
'ui': ['lib/ui']
2 changes: 1 addition & 1 deletion .github/workflows/cron-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Markdown Links Check
# runs every monday at 9 am
on:
schedule:
- cron: "0 9 * * 1"
- cron: '0 9 * * 1'

jobs:
check-links:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/generate-repros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
- cron: '2 2 */1 * *'
workflow_dispatch:
# To remove when the branch will be merged
# To remove when the branch will be merged
push:
branches:
- generate-repros
Expand All @@ -20,6 +20,8 @@ jobs:
run: |
git config --global user.name "Storybook Bot"
git config --global user.email "bot@storybook.js.org"
- name: Change directory
run: cd code
- name: Install dependencies
run: yarn install
- name: Generate repros with Latest Storybook CLI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdown-link-check-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
}
],
"aliveStatusCodes": [429, 200]
}
}
2 changes: 2 additions & 0 deletions .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ jobs:
cache: yarn
- name: install, bootstrap
run: |
cd code
yarn install --immutable
yarn bootstrap --core
- name: test
run: |
cd code
yarn test --runInBand --ci
Loading

0 comments on commit 8bbef0a

Please sign in to comment.