Skip to content

Commit

Permalink
Merge branch 'next' into addon-knobs-array-of-objects
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Nov 13, 2019
2 parents 9c29266 + 4f59937 commit 2221b30
Show file tree
Hide file tree
Showing 1,263 changed files with 26,000 additions and 14,262 deletions.
5 changes: 5 additions & 0 deletions .babelrc.js
Expand Up @@ -72,6 +72,11 @@ module.exports = {
test: withTests,
},
},
{
test: './app/react-native',
presets: ['module:metro-react-native-babel-preset'],
plugins: ['babel-plugin-macros', ['emotion', { sourceMap: true, autoLabel: true }]],
},
{
test: [
'./lib/node-logger',
Expand Down
167 changes: 58 additions & 109 deletions .circleci/config.yml
@@ -1,14 +1,11 @@
version: 2
version: 2.1

aliases:
- &defaults
working_directory: /tmp/storybook
docker:
- image: circleci/node:8
- image: circleci/node:10

dependencies:
pre:
- yarn global add npm
jobs:
build:
<<: *defaults
Expand All @@ -17,7 +14,7 @@ jobs:
- restore_cache:
name: Restore core dependencies cache
keys:
- core-dependencies-v3-{{ checksum "yarn.lock" }}
- core-dependencies-v4-{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: yarn install
Expand All @@ -29,9 +26,11 @@ jobs:
command: yarn bootstrap --core
- save_cache:
name: Cache core dependencies
key: core-dependencies-v3-{{ checksum "yarn.lock" }}
key: core-dependencies-v4-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- ~/.cache
- node_modules
- /root/.cache
- persist_to_workspace:
root: .
paths:
Expand All @@ -48,8 +47,12 @@ jobs:
- attach_workspace:
at: .
- run:
name: Run chromatic on the pre-built storybook
command: yarn chromatic -- -d ./storybook-static
name: Run chromatic on the pre-built official example
command: yarn chromatic --storybook-build-dir="built-storybooks/official-storybook" --exit-zero-on-changes --app-code="ab7m45tp9p"
- run:
name: Run chromatic on the pre-built angular example
command: yarn chromatic --storybook-build-dir="built-storybooks/angular-cli" --exit-zero-on-changes --app-code="tl92yzsj6w"

packtracker:
<<: *defaults
steps:
Expand All @@ -63,97 +66,50 @@ jobs:
yarn packtracker
examples:
<<: *defaults
parallelism: 4
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
command: sh ./scripts/workaround-puppeteer-issue-290.sh
- run:
name: Build react kitchen-sink
command: |
cd examples/cra-kitchen-sink
yarn build-storybook
- run:
name: Build react typescript kitchen-sink
command: |
cd examples/cra-ts-kitchen-sink
yarn build-storybook
- run:
name: Build vue kitchen-sink
command: |
cd examples/vue-kitchen-sink
yarn build-storybook
- run:
name: Build svelte kitchen-sink
command: |
cd examples/svelte-kitchen-sink
yarn build-storybook
- run:
name: Build angular-cli
command: |
cd examples/angular-cli
yarn build-storybook
- run:
name: Build ember-cli
command: |
cd examples/ember-cli
yarn build-storybook
- run:
name: Build polymer-cli
command: |
cd examples/polymer-cli
yarn build-storybook
- run:
name: Build marko-cli
command: |
cd examples/marko-cli
yarn build-storybook
- run:
name: Build mithril kitchen-sink
command: |
cd examples/mithril-kitchen-sink
yarn build-storybook
- run:
name: Build html kitchen-sink
command: |
cd examples/html-kitchen-sink
yarn build-storybook
- run:
name: Build riot kitchen-sink
command: |
cd examples/riot-kitchen-sink
yarn build-storybook
- run:
name: Build preact kitchen-sink
command: |
cd examples/preact-kitchen-sink
yarn build-storybook
- run:
name: Build cra react15
name: examples
command: |
cd examples/cra-react15
yarn build-storybook
- run:
name: Build official-storybook
command: |
cd examples/official-storybook
yarn build-storybook
# - run:
# name: Run image snapshots
# command: yarn test --image
- store_artifacts:
path: examples/official-storybook/image-snapshots/__image_snapshots__
destination: official_storybook_image_snapshots
yarn build-storybooks
- persist_to_workspace:
root: .
paths:
- built-storybooks
e2e:
working_directory: /tmp/storybook
docker:
- image: cypress/base:8
environment:
TERM: xterm
steps:
- checkout
- attach_workspace:
at: .
- run:
name: install cypress
command: yarn cypress install
- save_cache:
name: Cache core dependencies
key: core-dependencies-v4-{{ checksum "yarn.lock" }}
paths:
- ~/.cache
- node_modules
- examples
- addons
- app
- lib
- /root/.cache
- run:
name: running example
command: yarn serve-storybooks
background: true
- run:
name: await running examples
command: yarn await-serve-storybooks
- run:
name: cypress run
command: yarn cypress run

smoke-tests:
<<: *defaults
steps:
Expand Down Expand Up @@ -250,18 +206,13 @@ jobs:
- restore_cache:
name: Restore core dependencies cache
keys:
- core-dependencies-v3-{{ checksum "yarn.lock" }}
- core-dependencies-v4-{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: yarn install
command: yarn bootstrap --install
- run:
name: Trigger build
command: ./scripts/build-frontpage.js
- save_cache:
name: Cache core dependencies
key: core-dependencies-v3-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
docs:
<<: *defaults
steps:
Expand All @@ -284,12 +235,7 @@ jobs:
name: Cache docs dependencies
key: docs-dependencies-v2-{{ checksum "docs/yarn.lock" }}
paths:
- ~/.cache/yarn
- persist_to_workspace:
root: .
paths:
- docs/public
- docs/node_modules
- ~/.cache
lint:
<<: *defaults
steps:
Expand Down Expand Up @@ -322,19 +268,18 @@ jobs:
name: Upload coverage
command: yarn coverage
workflows:
version: 2
build_test_deploy:
test:
jobs:
- build
- docs
- frontpage
- lint:
requires:
- docs
- build
- examples:
requires:
- build
- e2e:
requires:
- examples
- smoke-tests:
requires:
- build
Expand All @@ -353,3 +298,7 @@ workflows:
- chromatic:
requires:
- examples
deploy:
jobs:
- docs
- frontpage
5 changes: 5 additions & 0 deletions .eslintignore
Expand Up @@ -12,6 +12,11 @@ scripts/storage
*.bundle.js
*.js.map
*.d.ts
examples/ember-cli/.storybook/preview-head.html
examples/official-storybook/tests/addon-jest.test.js
examples/cra-ts-kitchen-sink/*.json
examples/cra-ts-kitchen-sink/public/*.json
examples/cra-ts-kitchen-sink/public/*.html

!.remarkrc.js
!.babelrc.js
Expand Down

0 comments on commit 2221b30

Please sign in to comment.