From 76a5272fb722601a7b54eb7434450ab7d260a65d Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 18 Feb 2018 20:33:47 +0300 Subject: [PATCH 1/6] Cache dependencies for new frameworks examples --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 200add556775..b2bee37e3f86 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,9 @@ jobs: key: core-dependencies-{{ checksum "yarn.lock" }} paths: - node_modules + - example/angular-cli/node_modules - example/cra-kitchen-sink/node_modules + - example/polymer-cli/node_modules - example/vue-kitchen-sink/node_modules - save_cache: name: "Cache core dist" From 47191ba5838e37e8546c8d9f782bf44da9f34754 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 18 Feb 2018 20:41:18 +0300 Subject: [PATCH 2/6] add newline to discard cache --- yarn.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/yarn.lock b/yarn.lock index ec24f7875779..b7b5d47e320e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16939,3 +16939,4 @@ yn@^2.0.0: zone.js@^0.8.20: version "0.8.20" resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.20.tgz#a218c48db09464b19ff6fc8f0d4bb5b1046e185d" + From 4d6eb009af3efef246c3953044bd16016792d95a Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 18 Feb 2018 20:50:31 +0300 Subject: [PATCH 3/6] fix cache paths --- .circleci/config.yml | 9 +++++---- yarn.lock | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2bee37e3f86..d8138f9c31e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,10 +33,11 @@ jobs: key: core-dependencies-{{ checksum "yarn.lock" }} paths: - node_modules - - example/angular-cli/node_modules - - example/cra-kitchen-sink/node_modules - - example/polymer-cli/node_modules - - example/vue-kitchen-sink/node_modules + - examples/angular-cli/node_modules + - examples/cra-kitchen-sink/node_modules + - examples/official-storybook/node_modules + - examples/polymer-cli/node_modules + - examples/vue-kitchen-sink/node_modules - save_cache: name: "Cache core dist" key: core-dist-{{ .Revision }} diff --git a/yarn.lock b/yarn.lock index b7b5d47e320e..a7130e48498b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16940,3 +16940,4 @@ zone.js@^0.8.20: version "0.8.20" resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.20.tgz#a218c48db09464b19ff6fc8f0d4bb5b1046e185d" + From 0f3582c6ddfedd1ebae0516d1eb573329661eb1c Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 18 Feb 2018 20:59:19 +0300 Subject: [PATCH 4/6] Remove "Link packages" step as it turned out to be unneeded --- .circleci/config.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d8138f9c31e4..009f4895117a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,10 +57,6 @@ jobs: name: "Restore core dist cache" keys: - core-dist-{{ .Revision }} - - run: - name: "Link packages" - command: | - yarn install - run: name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290 command: sh ./scripts/workaround-puppeteer-issue-290.sh @@ -200,10 +196,6 @@ jobs: name: "Restore core dist cache" keys: - core-dist-{{ .Revision }} - - run: - name: "Link packages" - command: | - yarn install - run: name: "Lint" command: | @@ -220,10 +212,6 @@ jobs: name: "Restore core dist cache" keys: - core-dist-{{ .Revision }} - - run: - name: "Link packages" - command: | - yarn install - run: name: "Run unit tests" command: | From 86ed95c613e8c6b2e99ace4382b83267cb0f5b96 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 18 Feb 2018 21:04:11 +0300 Subject: [PATCH 5/6] lint job requires docs --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 009f4895117a..959cb427bfad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -278,6 +278,7 @@ workflows: - docs - lint: requires: + - docs - build - unit-test: requires: From 92236d18f145f3a5dd9af946a2285b29a9243870 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 18 Feb 2018 21:06:07 +0300 Subject: [PATCH 6/6] Extract smoke tests into its own job --- .circleci/config.yml | 48 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 959cb427bfad..4c956d501c28 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,6 +85,35 @@ jobs: command: | cd examples/official-storybook yarn build-storybook + - run: + name: "Visually test storybook" + command: | + yarn chromatic + - run: + name: "Run image snapshots" + command: yarn test --image + - run: + name: Integration Test - Kichen sinks + command: yarn test --integration + - store_artifacts: + path: integration/__image_snapshots__ + destination: integration_image_snapshots + - store_artifacts: + path: examples/official-storybook/image-snapshots/__image_snapshots__ + destination: official_storybook_image_snapshots + smoke-tests: + <<: *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: "Run react kitchen-sink (smoke test)" command: | @@ -110,22 +139,6 @@ jobs: command: | cd examples/official-storybook yarn storybook --smoke-test - - run: - name: "Visually test storybook" - command: | - yarn chromatic - - run: - name: "Run image snapshots" - command: yarn test --image - - run: - name: Integration Test - Kichen sinks - command: yarn test --integration - - store_artifacts: - path: integration/__image_snapshots__ - destination: integration_image_snapshots - - store_artifacts: - path: examples/official-storybook/image-snapshots/__image_snapshots__ - destination: official_storybook_image_snapshots react-native: <<: *defaults steps: @@ -272,6 +285,9 @@ workflows: - example-kitchen-sinks: requires: - build + - smoke-tests: + requires: + - build - react-native: requires: - build