Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into tmeasday/shilman-re…
Browse files Browse the repository at this point in the history
…factor-core-rebase
  • Loading branch information
tmeasday committed Jan 3, 2018
2 parents 9c3ec7f + 911e615 commit 48cd311
Show file tree
Hide file tree
Showing 389 changed files with 18,860 additions and 9,917 deletions.
7 changes: 7 additions & 0 deletions .bithoundrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,12 @@
"wc": {
"limit": 500
}
},
"dependencies": {
"mute": [
"shelljs",
"eslint-plugin-json",
"remark-lint-code-eslint"
]
}
}
219 changes: 141 additions & 78 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defaults: &defaults
working_directory: /tmp/storybook
docker:
- image: circleci/node:8.9
- image: circleci/node:8

version: 2
dependencies:
Expand All @@ -13,42 +13,51 @@ jobs:
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- dependencies-{{ checksum "yarn.lock" }}
- core-dependencies-{{ checksum "yarn.lock" }}
- run:
name: "Install dependencies"
command: |
yarn install
- run:
name: "Bootstrapping"
name: "Dirty check"
command: |
yarn bootstrap --core --docs --reactnative --reactnativeapp
yarn repo-dirty-check
- run:
name: "Dirty checking"
name: "Bootstrap"
command: |
yarn repo-dirty-check
yarn bootstrap --core
- save_cache:
key: dependencies-{{ checksum "yarn.lock" }}
name: "Cache core dependencies"
key: core-dependencies-{{ checksum "yarn.lock" }}
paths:
- node_modules
- docs/node_modules
- examples/react-native-vanilla/node_modules
- examples/crna-kitchen-sink/node_modules
- example/cra-kitchen-sink/node_modules
- example/vue-kitchen-sink/node_modules
- save_cache:
name: "Cache core dist"
key: core-dist-{{ .Revision }}
paths:
- addons
- app
- lib
example-kitchen-sinks:
<<: *defaults
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- core-dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
name: "Restore core dist cache"
keys:
- dependencies-{{ checksum "yarn.lock" }}
- core-dist-{{ .Revision }}
- run:
name: "Install dependencies"
name: "Link packages"
command: |
yarn install
- run:
name: "Bootstrapping"
command: |
yarn bootstrap --core
- run:
name: "Build react kitchen-sink"
command: |
Expand All @@ -59,17 +68,28 @@ jobs:
command: |
cd examples/vue-kitchen-sink
yarn build-storybook
- run:
name: "Build angular-cli"
command: |
cd examples/angular-cli
yarn build-storybook
- run:
name: "Run react kitchen-sink"
command: |
cd examples/cra-kitchen-sink
yarn storybook
background: true
- run:
name: "Run vue kitchen-sink"
command: |
cd examples/vue-kitchen-sink
yarn storybook
background: true
- run:
name: "Run react kitchen-sink"
name: "Run angular-cli"
command: |
cd examples/cra-kitchen-sink
cd examples/angular-cli
yarn storybook
background: true
- run:
Expand All @@ -81,89 +101,125 @@ jobs:
- store_artifacts:
path: integration/__image_snapshots__
destination: integration_image_snapshots
example-react-native:
react-native:
<<: *defaults
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- dependencies-{{ checksum "yarn.lock" }}
- run:
name: "Install dependencies"
command: |
yarn install
- core-dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- run:
name: "Bootstrapping packages"
name: "Bootstrap"
command: |
yarn bootstrap --core --reactnative --reactnativeapp
yarn bootstrap --reactnative --reactnativeapp
- run:
name: "Running React-Native example"
name: "Run React-Native example"
command: |
cd examples/react-native-vanilla
yarn storybook --smoke-test
- run:
name: "Running React-Native-App example"
name: "Run React-Native-App example"
command: |
cd examples/crna-kitchen-sink
yarn storybook --smoke-test
- run:
name: "Run React-Native unit tests"
command: |
yarn test --coverage --runInBand --reactnative
yarn coverage
docs:
<<: *defaults
steps:
- checkout
- restore_cache:
name: "Restore dependencies cache"
keys:
- dependencies-{{ checksum "yarn.lock" }}
- docs-dependencies-{{ checksum "docs/yarn.lock" }}
- run:
name: "Install dependencies"
command: |
yarn install
- run:
name: "Bootstrapping"
command: |
yarn bootstrap --docs
cd docs
yarn install --frozen-lockfile
- run:
name: "Running docs"
name: "Build docs"
command: |
yarn docs:build
cd docs
yarn build
- save_cache:
name: "Cache dependencies"
key: docs-dependencies-{{ checksum "docs/yarn.lock" }}
paths:
- docs/node_modules
lint:
<<: *defaults
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- core-dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
name: "Restore docs dependencies cache"
keys:
- docs-dependencies-{{ checksum "docs/yarn.lock" }}
- restore_cache:
name: "Restore core dist cache"
keys:
- dependencies-{{ checksum "yarn.lock" }}
- core-dist-{{ .Revision }}
- run:
name: "Install dependencies"
name: "Link packages"
command: |
yarn install
- run:
name: "Bootstrapping"
command: |
yarn bootstrap --core --docs
- run:
name: "Linting"
name: "Lint"
command: |
yarn lint
unit-test:
<<: *defaults
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- core-dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
name: "Restore core dist cache"
keys:
- dependencies-{{ checksum "yarn.lock" }}
- core-dist-{{ .Revision }}
- run:
name: "Install dependencies"
name: "Link packages"
command: |
yarn install
- run:
name: "Bootstrapping"
name: "Run unit tests"
command: |
yarn bootstrap --core --reactnative
yarn test --coverage --runInBand --core
yarn coverage
storybook:
<<: *defaults
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- core-dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- run:
name: "Unit testing"
name: "Link packages"
command: |
yarn test --coverage --runInBand --core --reactnative
yarn coverage
yarn install
- run:
name: "Visually test storybook"
command: |
yarn chromatic
cli:
working_directory: /tmp/storybook
docker:
Expand All @@ -173,19 +229,15 @@ jobs:
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- dependencies-{{ checksum "yarn.lock" }}
- dependencies-
- run:
name: "Install dependencies"
command: |
yarn install
- run:
name: "Bootstrapping"
command: |
yarn bootstrap --core
- core-dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- run:
name: "Testing CLI"
name: "Test CLI"
command: |
yarn test --cli
cli-latest-cra:
Expand All @@ -197,19 +249,15 @@ jobs:
steps:
- checkout
- restore_cache:
name: "Restore core dependencies cache"
keys:
- dependencies-{{ checksum "yarn.lock" }}
- dependencies-
- run:
name: "Install dependencies"
command: |
yarn install
- run:
name: "Bootstrapping"
command: |
yarn bootstrap --core
- core-dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
name: "Restore core dist cache"
keys:
- core-dist-{{ .Revision }}
- run:
name: "Testing CLI with latest CR(N)A"
name: "Test CLI with latest CR(N)A"
command: |
yarn test-latest-cra
deploy:
Expand All @@ -224,10 +272,25 @@ workflows:
build_accept_deploy:
jobs:
- build
- example-kitchen-sinks
- example-react-native
- example-kitchen-sinks:
requires:
- build
- react-native:
requires:
- build
- docs
- lint
- unit-test
- cli
- cli-latest-cra
- lint:
requires:
- build
- unit-test:
requires:
- build
- storybook:
requires:
- build
- cli:
requires:
- build
- cli-latest-cra:
requires:
- build
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ root = true
[*]
end_of_line = lf

[*.{js,json}]
[*.{js,json,ts}]
indent_style = space
indent_size = 2
Loading

0 comments on commit 48cd311

Please sign in to comment.