From c3be851c180480e7d181ab1aa9f09caf0fb4d093 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 15:20:08 +0200 Subject: Check bundle size on CI --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 2231ae796..a1f11921a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -179,6 +179,7 @@ jobs: - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn prettier:ci - run: yarn lerna run lint + - run: yarn bundlesize submit-coverage: docker: - image: circleci/node:9 -- cgit v1.2.3 From 1059acf56f3cccc28a7bac5a6c513476c189d403 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 15:23:12 +0200 Subject: Fix no_website CI builds --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index a1f11921a..6c1525101 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: - node_modules/ - run: > if [ -z "$(git diff --name-only development packages/website)" ]; then - yarn build --exclude website + yarn build:no_website else yarn build fi -- cgit v1.2.3 From 9e3d1cd63d1ed521496118f90b79515c723bd5a0 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 16:43:36 +0200 Subject: Move bundle-size out of static tests and don't wait for a build with static tests --- .circleci/config.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c1525101..f83fdf3f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -173,12 +173,19 @@ jobs: working_directory: ~/repo docker: - image: circleci/node:9 + steps: + - checkout + - run: yarn prettier:ci + - run: yarn lerna run lint + bundle-size: + docker: + - image: circleci/node:9 + working_directory: ~/repo steps: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn prettier:ci - - run: yarn lerna run lint + - run: cd packages/0x.js && yarn build:umd:prod - run: yarn bundlesize submit-coverage: docker: @@ -254,7 +261,8 @@ workflows: - test-rest: requires: - build - - static-tests: + - static-tests + - bundle-size: requires: - build - test-publish: -- cgit v1.2.3 From 97616eb8e4c3a8af81337eda8f5d97de59c6fc1f Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 16:52:08 +0200 Subject: Split CI install and build steps --- .circleci/config.yml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index f83fdf3f0..dbe3b3fdd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 jobs: - build: + install-dependencies: resource_class: medium+ docker: - image: circleci/node:9 @@ -29,11 +29,26 @@ jobs: key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} paths: - node_modules/ + - save_cache: + key: repo-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo + build: + resource_class: medium+ + docker: + - image: circleci/node:9 + environment: + CONTRACTS_COMMIT_HASH: '9ed05f5' + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: > if [ -z "$(git diff --name-only development packages/website)" ]; then - yarn build:no_website + yarn build:ci:no_website else - yarn build + yarn build:ci fi - save_cache: key: repo-{{ .Environment.CIRCLE_SHA1 }} @@ -174,7 +189,9 @@ jobs: docker: - image: circleci/node:9 steps: - - checkout + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn prettier:ci - run: yarn lerna run lint bundle-size: @@ -251,7 +268,10 @@ workflows: version: 2 main: jobs: - - build + - install-dependencies + - build: + requires: + - install-dependencies - test-contracts-ganache: requires: - build @@ -261,7 +281,9 @@ workflows: - test-rest: requires: - build - - static-tests + - static-tests: + requires: + - install-dependencies - bundle-size: requires: - build -- cgit v1.2.3 From 52ac84335cd4516614d32bf7aa97dfc102b49a49 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 17:03:09 +0200 Subject: Add yarn cache path --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index dbe3b3fdd..3f07a493d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,6 +29,7 @@ jobs: key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} paths: - node_modules/ + - ~/.cache/yarn - save_cache: key: repo-{{ .Environment.CIRCLE_SHA1 }} paths: -- cgit v1.2.3 From a02e6c044161834c58bf009e3cdbfe30fe23bfd9 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 17:05:35 +0200 Subject: Run linter before prettier as it fails more often --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f07a493d..6d0630bcd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -193,8 +193,8 @@ jobs: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn prettier:ci - run: yarn lerna run lint + - run: yarn prettier:ci bundle-size: docker: - image: circleci/node:9 -- cgit v1.2.3 From ddc0813d90f49035c3104f8da3ebdaf04acf98a8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 17:07:12 +0200 Subject: Cache yarn cache directory without node modules --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d0630bcd..d4607b99d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,6 @@ jobs: name: Save Yarn Package Cache key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} paths: - - node_modules/ - ~/.cache/yarn - save_cache: key: repo-{{ .Environment.CIRCLE_SHA1 }} -- cgit v1.2.3 From 86cc98b24559d05b034c7117e57cfd2ab73ac0e9 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 17:15:47 +0200 Subject: Build tslint rules before running linter --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index d4607b99d..72c4a6252 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -192,6 +192,7 @@ jobs: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: cd packages/tslint-config && yarn build:ci - run: yarn lerna run lint - run: yarn prettier:ci bundle-size: -- cgit v1.2.3 From 3a93c8a6e08666ac6c737e1da363ee04188174a7 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 1 Oct 2018 17:18:55 +0200 Subject: Separate deps and built caches --- .circleci/config.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 72c4a6252..9fe90ee94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,10 +14,10 @@ jobs: - restore_cache: name: Restore Yarn Package Cache keys: - - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-{{ .Branch }} - - yarn-packages-master - - yarn-packages- + - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} + - yarn-packages-v1-{{ .Branch }} + - yarn-packages-v1-master + - yarn-packages-v1- - run: name: install-yarn command: sudo npm install --global yarn@1.9.4 @@ -26,11 +26,11 @@ jobs: command: yarn --frozen-lockfile install || yarn --frozen-lockfile install - save_cache: name: Save Yarn Package Cache - key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} + key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} paths: - ~/.cache/yarn - save_cache: - key: repo-{{ .Environment.CIRCLE_SHA1 }} + key: repo-deps-{{ .Environment.CIRCLE_SHA1 }} paths: - ~/repo build: @@ -43,7 +43,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-deps-{{ .Environment.CIRCLE_SHA1 }} - run: > if [ -z "$(git diff --name-only development packages/website)" ]; then yarn build:ci:no_website @@ -51,7 +51,7 @@ jobs: yarn build:ci fi - save_cache: - key: repo-{{ .Environment.CIRCLE_SHA1 }} + key: repo-built-{{ .Environment.CIRCLE_SHA1 }} paths: - ~/repo test-contracts-ganache: @@ -61,7 +61,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-built-{{ .Environment.CIRCLE_SHA1 }} - run: yarn wsrun test:circleci contracts test-contracts-geth: docker: @@ -71,7 +71,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-built-{{ .Environment.CIRCLE_SHA1 }} # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is # initialized - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts @@ -84,7 +84,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-built-{{ .Environment.CIRCLE_SHA1 }} - run: yarn test:publish:circleci test-doc-generation: docker: @@ -93,7 +93,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-built-{{ .Environment.CIRCLE_SHA1 }} - run: yarn test:generate_docs:circleci test-rest: docker: @@ -102,7 +102,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-built-{{ .Environment.CIRCLE_SHA1 }} - run: yarn wsrun test:circleci @0xproject/abi-gen - run: yarn wsrun test:circleci @0xproject/assert - run: yarn wsrun test:circleci @0xproject/base-contract @@ -191,7 +191,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-deps-{{ .Environment.CIRCLE_SHA1 }} - run: cd packages/tslint-config && yarn build:ci - run: yarn lerna run lint - run: yarn prettier:ci @@ -202,7 +202,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-built-{{ .Environment.CIRCLE_SHA1 }} - run: cd packages/0x.js && yarn build:umd:prod - run: yarn bundlesize submit-coverage: @@ -212,7 +212,7 @@ jobs: steps: - restore_cache: keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} + - repo-built-{{ .Environment.CIRCLE_SHA1 }} - restore_cache: keys: - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} -- cgit v1.2.3 From cc7710abd2dfdfc4ac05d23883c0359561d43f4b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 2 Oct 2018 11:12:14 +0200 Subject: Explicitly specify yarn cache folder --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 9fe90ee94..05192c1d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: command: sudo npm install --global yarn@1.9.4 - run: name: yarn - command: yarn --frozen-lockfile install || yarn --frozen-lockfile install + command: yarn --cache-folder ~/.cache/yarn --frozen-lockfile install || yarn --cache-folder ~/.cache/yarn --frozen-lockfile install - save_cache: name: Save Yarn Package Cache key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} -- cgit v1.2.3 From 194a5de5641bdc994fcb653fe28d51ca172db03c Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 2 Oct 2018 11:32:38 +0200 Subject: Cache all nested node_modules directories --- .circleci/config.yml | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 05192c1d9..889b292a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,10 +14,10 @@ jobs: - restore_cache: name: Restore Yarn Package Cache keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }} - - yarn-packages-v1-master - - yarn-packages-v1- + - yarn-packages-v2-{{ .Branch }}-{{ checksum "yarn.lock" }} + - yarn-packages-v2-{{ .Branch }} + - yarn-packages-v2-master + - yarn-packages-v2- - run: name: install-yarn command: sudo npm install --global yarn@1.9.4 @@ -26,9 +26,46 @@ jobs: command: yarn --cache-folder ~/.cache/yarn --frozen-lockfile install || yarn --cache-folder ~/.cache/yarn --frozen-lockfile install - save_cache: name: Save Yarn Package Cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} + key: yarn-packages-v2-{{ .Branch }}-{{ checksum "yarn.lock" }} paths: - ~/.cache/yarn + - node_modules + - packages/0x.js/node_modules + - packages/abi-gen/node_modules + - packages/assert/node_modules + - packages/asset-buyer/node_modules + - packages/base-contract/node_modules + - packages/connect/node_modules + - packages/contract-wrappers/node_modules + - packages/contract_templates/node_modules + - packages/contracts/node_modules + - packages/dev-utils/node_modules + - packages/devnet/node_modules + - packages/ethereum-types/node_modules + - packages/fill-scenarios/node_modules + - packages/json-schemas/node_modules + - packages/metacoin/node_modules + - packages/migrations/node_modules + - packages/monorepo-scripts/node_modules + - packages/order-utils/node_modules + - packages/order-watcher/node_modules + - packages/react-docs/node_modules + - packages/react-shared/node_modules + - packages/sol-compiler/node_modules + - packages/sol-cov/node_modules + - packages/sol-doc/node_modules + - packages/sol-resolver/node_modules + - packages/sra-report/node_modules + - packages/sra-spec/node_modules + - packages/subproviders/node_modules + - packages/testnet-faucets/node_modules + - packages/tslint-config/node_modules + - packages/types/node_modules + - packages/typescript-typings/node_modules + - packages/utils/node_modules + - packages/verdaccio/node_modules + - packages/web3-wrapper/node_modules + - packages/website/node_modules - save_cache: key: repo-deps-{{ .Environment.CIRCLE_SHA1 }} paths: -- cgit v1.2.3 From 8ee34c49a9c8b29be3440251dcb8746ad6b11a00 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 2 Oct 2018 11:38:51 +0200 Subject: Remove deps cache all together --- .circleci/config.yml | 51 +-------------------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 889b292a6..8940ad0aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,61 +11,12 @@ jobs: steps: - checkout - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-v2-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v2-{{ .Branch }} - - yarn-packages-v2-master - - yarn-packages-v2- - run: name: install-yarn command: sudo npm install --global yarn@1.9.4 - run: name: yarn - command: yarn --cache-folder ~/.cache/yarn --frozen-lockfile install || yarn --cache-folder ~/.cache/yarn --frozen-lockfile install - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-v2-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - ~/.cache/yarn - - node_modules - - packages/0x.js/node_modules - - packages/abi-gen/node_modules - - packages/assert/node_modules - - packages/asset-buyer/node_modules - - packages/base-contract/node_modules - - packages/connect/node_modules - - packages/contract-wrappers/node_modules - - packages/contract_templates/node_modules - - packages/contracts/node_modules - - packages/dev-utils/node_modules - - packages/devnet/node_modules - - packages/ethereum-types/node_modules - - packages/fill-scenarios/node_modules - - packages/json-schemas/node_modules - - packages/metacoin/node_modules - - packages/migrations/node_modules - - packages/monorepo-scripts/node_modules - - packages/order-utils/node_modules - - packages/order-watcher/node_modules - - packages/react-docs/node_modules - - packages/react-shared/node_modules - - packages/sol-compiler/node_modules - - packages/sol-cov/node_modules - - packages/sol-doc/node_modules - - packages/sol-resolver/node_modules - - packages/sra-report/node_modules - - packages/sra-spec/node_modules - - packages/subproviders/node_modules - - packages/testnet-faucets/node_modules - - packages/tslint-config/node_modules - - packages/types/node_modules - - packages/typescript-typings/node_modules - - packages/utils/node_modules - - packages/verdaccio/node_modules - - packages/web3-wrapper/node_modules - - packages/website/node_modules + command: yarn --frozen-lockfile install || yarn --frozen-lockfile install - save_cache: key: repo-deps-{{ .Environment.CIRCLE_SHA1 }} paths: -- cgit v1.2.3 From fed7e0c8583133a928a7d9d0d811c0c324e90002 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 2 Oct 2018 11:45:22 +0200 Subject: Merge build & install --- .circleci/config.yml | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 8940ad0aa..37a10f2f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 jobs: - install-dependencies: + build: resource_class: medium+ docker: - image: circleci/node:9 @@ -17,21 +17,6 @@ jobs: - run: name: yarn command: yarn --frozen-lockfile install || yarn --frozen-lockfile install - - save_cache: - key: repo-deps-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo - build: - resource_class: medium+ - docker: - - image: circleci/node:9 - environment: - CONTRACTS_COMMIT_HASH: '9ed05f5' - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-deps-{{ .Environment.CIRCLE_SHA1 }} - run: > if [ -z "$(git diff --name-only development packages/website)" ]; then yarn build:ci:no_website @@ -176,21 +161,12 @@ jobs: working_directory: ~/repo docker: - image: circleci/node:9 - steps: - - restore_cache: - keys: - - repo-deps-{{ .Environment.CIRCLE_SHA1 }} - - run: cd packages/tslint-config && yarn build:ci - - run: yarn lerna run lint - - run: yarn prettier:ci - bundle-size: - docker: - - image: circleci/node:9 - working_directory: ~/repo steps: - restore_cache: keys: - repo-built-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn lint + - run: yarn prettier:ci - run: cd packages/0x.js && yarn build:umd:prod - run: yarn bundlesize submit-coverage: @@ -257,10 +233,7 @@ workflows: version: 2 main: jobs: - - install-dependencies - - build: - requires: - - install-dependencies + - build - test-contracts-ganache: requires: - build @@ -271,9 +244,6 @@ workflows: requires: - build - static-tests: - requires: - - install-dependencies - - bundle-size: requires: - build - test-publish: -- cgit v1.2.3 From d6e0dc4bd2ec6629a11b3fb7a70cdd9ea359b46e Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 2 Oct 2018 12:01:03 +0200 Subject: Change the lint command back --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 37a10f2f8..0ff947c54 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -165,7 +165,7 @@ jobs: - restore_cache: keys: - repo-built-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn lint + - run: yarn lerna run lint - run: yarn prettier:ci - run: cd packages/0x.js && yarn build:umd:prod - run: yarn bundlesize -- cgit v1.2.3 From a4153144dbd2a46d51069e57ba7c1402e5867154 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 2 Oct 2018 13:40:30 +0200 Subject: Change cache key back to repo from repo-built --- .circleci/config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ff947c54..f288a46e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,7 +24,7 @@ jobs: yarn build:ci fi - save_cache: - key: repo-built-{{ .Environment.CIRCLE_SHA1 }} + key: repo-{{ .Environment.CIRCLE_SHA1 }} paths: - ~/repo test-contracts-ganache: @@ -34,7 +34,7 @@ jobs: steps: - restore_cache: keys: - - repo-built-{{ .Environment.CIRCLE_SHA1 }} + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn wsrun test:circleci contracts test-contracts-geth: docker: @@ -44,7 +44,7 @@ jobs: steps: - restore_cache: keys: - - repo-built-{{ .Environment.CIRCLE_SHA1 }} + - repo-{{ .Environment.CIRCLE_SHA1 }} # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is # initialized - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts @@ -57,7 +57,7 @@ jobs: steps: - restore_cache: keys: - - repo-built-{{ .Environment.CIRCLE_SHA1 }} + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn test:publish:circleci test-doc-generation: docker: @@ -66,7 +66,7 @@ jobs: steps: - restore_cache: keys: - - repo-built-{{ .Environment.CIRCLE_SHA1 }} + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn test:generate_docs:circleci test-rest: docker: @@ -75,7 +75,7 @@ jobs: steps: - restore_cache: keys: - - repo-built-{{ .Environment.CIRCLE_SHA1 }} + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn wsrun test:circleci @0xproject/abi-gen - run: yarn wsrun test:circleci @0xproject/assert - run: yarn wsrun test:circleci @0xproject/base-contract @@ -164,7 +164,7 @@ jobs: steps: - restore_cache: keys: - - repo-built-{{ .Environment.CIRCLE_SHA1 }} + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn lerna run lint - run: yarn prettier:ci - run: cd packages/0x.js && yarn build:umd:prod @@ -176,7 +176,7 @@ jobs: steps: - restore_cache: keys: - - repo-built-{{ .Environment.CIRCLE_SHA1 }} + - repo-{{ .Environment.CIRCLE_SHA1 }} - restore_cache: keys: - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} -- cgit v1.2.3 From 08ba4ffd61e17155b4fcbf0a9d7385ba2af0c725 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 4 Oct 2018 16:35:30 +0100 Subject: Build website in parallel with other tests since no other test relies on it being built to run --- .circleci/config.yml | 508 ++++++++++++++++++++++++++------------------------- 1 file changed, 256 insertions(+), 252 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index f288a46e6..a848a4a0c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,257 +1,261 @@ version: 2 jobs: - build: - resource_class: medium+ - docker: - - image: circleci/node:9 - environment: - CONTRACTS_COMMIT_HASH: '9ed05f5' - working_directory: ~/repo - steps: - - checkout - - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - - run: - name: install-yarn - command: sudo npm install --global yarn@1.9.4 - - run: - name: yarn - command: yarn --frozen-lockfile install || yarn --frozen-lockfile install - - run: > - if [ -z "$(git diff --name-only development packages/website)" ]; then - yarn build:ci:no_website - else - yarn build:ci - fi - - save_cache: - key: repo-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo - test-contracts-ganache: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci contracts - test-contracts-geth: - docker: - - image: circleci/node:9 - - image: 0xorg/devnet - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is - # initialized - - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts - test-publish: - resource_class: medium+ - docker: - - image: circleci/node:9 - - image: 0xorg/verdaccio - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:publish:circleci - test-doc-generation: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:generate_docs:circleci - test-rest: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci @0xproject/abi-gen - - run: yarn wsrun test:circleci @0xproject/assert - - run: yarn wsrun test:circleci @0xproject/base-contract - - run: yarn wsrun test:circleci @0xproject/connect - - run: yarn wsrun test:circleci @0xproject/contract-wrappers - - run: yarn wsrun test:circleci @0xproject/dev-utils - - run: yarn wsrun test:circleci @0xproject/json-schemas - - run: yarn wsrun test:circleci @0xproject/metacoin - - run: yarn wsrun test:circleci @0xproject/order-utils - - run: yarn wsrun test:circleci @0xproject/order-watcher - - run: yarn wsrun test:circleci @0xproject/sol-compiler - - run: yarn wsrun test:circleci @0xproject/sol-cov - - run: yarn wsrun test:circleci @0xproject/sol-doc - - run: yarn wsrun test:circleci @0xproject/sra-report - - run: yarn wsrun test:circleci @0xproject/subproviders - - run: yarn wsrun test:circleci @0xproject/web3-wrapper - - run: yarn wsrun test:circleci @0xproject/utils - - save_cache: - key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/abi-gen/coverage/lcov.info - - save_cache: - key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/assert/coverage/lcov.info - - save_cache: - key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/base-contract/coverage/lcov.info - - save_cache: - key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/connect/coverage/lcov.info - - save_cache: - key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/contract-wrappers/coverage/lcov.info - - save_cache: - key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/dev-utils/coverage/lcov.info - - save_cache: - key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/json-schemas/coverage/lcov.info - - save_cache: - key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/metacoin/coverage/lcov.info - - save_cache: - key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-utils/coverage/lcov.info - - save_cache: - key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-watcher/coverage/lcov.info - - save_cache: - key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-compiler/coverage/lcov.info - - save_cache: - key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-cov/coverage/lcov.info - - save_cache: - key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-doc/coverage/lcov.info - - save_cache: - key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sra-report/coverage/lcov.info - - save_cache: - key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/subproviders/coverage/lcov.info - - save_cache: - key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/web3-wrapper/coverage/lcov.info - static-tests: - working_directory: ~/repo - docker: - - image: circleci/node:9 - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn lerna run lint - - run: yarn prettier:ci - - run: cd packages/0x.js && yarn build:umd:prod - - run: yarn bundlesize - submit-coverage: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn report_coverage + build: + resource_class: medium+ + docker: + - image: circleci/node:9 + environment: + CONTRACTS_COMMIT_HASH: '9ed05f5' + working_directory: ~/repo + steps: + - checkout + - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV + - run: + name: install-yarn + command: sudo npm install --global yarn@1.9.4 + - run: + name: yarn + command: yarn --frozen-lockfile install || yarn --frozen-lockfile install + - run: yarn build:ci:no_website + - save_cache: + key: repo-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo + build-website: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: cd packages/website && yarn build + test-contracts-ganache: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci contracts + test-contracts-geth: + docker: + - image: circleci/node:9 + - image: 0xorg/devnet + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is + # initialized + - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts + test-publish: + resource_class: medium+ + docker: + - image: circleci/node:9 + - image: 0xorg/verdaccio + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:publish:circleci + test-doc-generation: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:generate_docs:circleci + test-rest: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci @0xproject/abi-gen + - run: yarn wsrun test:circleci @0xproject/assert + - run: yarn wsrun test:circleci @0xproject/base-contract + - run: yarn wsrun test:circleci @0xproject/connect + - run: yarn wsrun test:circleci @0xproject/contract-wrappers + - run: yarn wsrun test:circleci @0xproject/dev-utils + - run: yarn wsrun test:circleci @0xproject/json-schemas + - run: yarn wsrun test:circleci @0xproject/metacoin + - run: yarn wsrun test:circleci @0xproject/order-utils + - run: yarn wsrun test:circleci @0xproject/order-watcher + - run: yarn wsrun test:circleci @0xproject/sol-compiler + - run: yarn wsrun test:circleci @0xproject/sol-cov + - run: yarn wsrun test:circleci @0xproject/sol-doc + - run: yarn wsrun test:circleci @0xproject/sra-report + - run: yarn wsrun test:circleci @0xproject/subproviders + - run: yarn wsrun test:circleci @0xproject/web3-wrapper + - run: yarn wsrun test:circleci @0xproject/utils + - save_cache: + key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/abi-gen/coverage/lcov.info + - save_cache: + key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/assert/coverage/lcov.info + - save_cache: + key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/base-contract/coverage/lcov.info + - save_cache: + key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/connect/coverage/lcov.info + - save_cache: + key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/contract-wrappers/coverage/lcov.info + - save_cache: + key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/dev-utils/coverage/lcov.info + - save_cache: + key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/json-schemas/coverage/lcov.info + - save_cache: + key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/metacoin/coverage/lcov.info + - save_cache: + key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-utils/coverage/lcov.info + - save_cache: + key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-watcher/coverage/lcov.info + - save_cache: + key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-compiler/coverage/lcov.info + - save_cache: + key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-cov/coverage/lcov.info + - save_cache: + key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-doc/coverage/lcov.info + - save_cache: + key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sra-report/coverage/lcov.info + - save_cache: + key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/subproviders/coverage/lcov.info + - save_cache: + key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/web3-wrapper/coverage/lcov.info + static-tests: + working_directory: ~/repo + docker: + - image: circleci/node:9 + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn lerna run lint + - run: yarn prettier:ci + - run: cd packages/0x.js && yarn build:umd:prod + - run: yarn bundlesize + submit-coverage: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn report_coverage workflows: - version: 2 - main: - jobs: - - build - - test-contracts-ganache: - requires: + version: 2 + main: + jobs: - build - - test-contracts-geth: - requires: - - build - - test-rest: - requires: - - build - - static-tests: - requires: - - build - - test-publish: - requires: - - build - - test-doc-generation: - requires: - - build - - submit-coverage: - requires: - - test-rest + - test-contracts-ganache: + requires: + - build + - test-contracts-geth: + requires: + - build + - test-rest: + requires: + - build + - static-tests: + requires: + - build + - test-publish: + requires: + - build + - test-doc-generation: + requires: + - build + - submit-coverage: + requires: + - test-rest -- cgit v1.2.3 From 3624c63a464a2ff4988b0bad2830d12482cd69b8 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 4 Oct 2018 16:43:52 +0100 Subject: Revert format and re-add changes --- .circleci/config.yml | 512 +++++++++++++++++++++++++-------------------------- 1 file changed, 256 insertions(+), 256 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index a848a4a0c..c04f6e3c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,261 +1,261 @@ version: 2 jobs: - build: - resource_class: medium+ - docker: - - image: circleci/node:9 - environment: - CONTRACTS_COMMIT_HASH: '9ed05f5' - working_directory: ~/repo - steps: - - checkout - - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - - run: - name: install-yarn - command: sudo npm install --global yarn@1.9.4 - - run: - name: yarn - command: yarn --frozen-lockfile install || yarn --frozen-lockfile install - - run: yarn build:ci:no_website - - save_cache: - key: repo-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo - build-website: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: cd packages/website && yarn build - test-contracts-ganache: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci contracts - test-contracts-geth: - docker: - - image: circleci/node:9 - - image: 0xorg/devnet - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is - # initialized - - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts - test-publish: - resource_class: medium+ - docker: - - image: circleci/node:9 - - image: 0xorg/verdaccio - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:publish:circleci - test-doc-generation: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:generate_docs:circleci - test-rest: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci @0xproject/abi-gen - - run: yarn wsrun test:circleci @0xproject/assert - - run: yarn wsrun test:circleci @0xproject/base-contract - - run: yarn wsrun test:circleci @0xproject/connect - - run: yarn wsrun test:circleci @0xproject/contract-wrappers - - run: yarn wsrun test:circleci @0xproject/dev-utils - - run: yarn wsrun test:circleci @0xproject/json-schemas - - run: yarn wsrun test:circleci @0xproject/metacoin - - run: yarn wsrun test:circleci @0xproject/order-utils - - run: yarn wsrun test:circleci @0xproject/order-watcher - - run: yarn wsrun test:circleci @0xproject/sol-compiler - - run: yarn wsrun test:circleci @0xproject/sol-cov - - run: yarn wsrun test:circleci @0xproject/sol-doc - - run: yarn wsrun test:circleci @0xproject/sra-report - - run: yarn wsrun test:circleci @0xproject/subproviders - - run: yarn wsrun test:circleci @0xproject/web3-wrapper - - run: yarn wsrun test:circleci @0xproject/utils - - save_cache: - key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/abi-gen/coverage/lcov.info - - save_cache: - key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/assert/coverage/lcov.info - - save_cache: - key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/base-contract/coverage/lcov.info - - save_cache: - key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/connect/coverage/lcov.info - - save_cache: - key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/contract-wrappers/coverage/lcov.info - - save_cache: - key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/dev-utils/coverage/lcov.info - - save_cache: - key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/json-schemas/coverage/lcov.info - - save_cache: - key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/metacoin/coverage/lcov.info - - save_cache: - key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-utils/coverage/lcov.info - - save_cache: - key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-watcher/coverage/lcov.info - - save_cache: - key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-compiler/coverage/lcov.info - - save_cache: - key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-cov/coverage/lcov.info - - save_cache: - key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-doc/coverage/lcov.info - - save_cache: - key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sra-report/coverage/lcov.info - - save_cache: - key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/subproviders/coverage/lcov.info - - save_cache: - key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/web3-wrapper/coverage/lcov.info - static-tests: - working_directory: ~/repo - docker: - - image: circleci/node:9 - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn lerna run lint - - run: yarn prettier:ci - - run: cd packages/0x.js && yarn build:umd:prod - - run: yarn bundlesize - submit-coverage: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn report_coverage + build: + resource_class: medium+ + docker: + - image: circleci/node:9 + environment: + CONTRACTS_COMMIT_HASH: '9ed05f5' + working_directory: ~/repo + steps: + - checkout + - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV + - run: + name: install-yarn + command: sudo npm install --global yarn@1.9.4 + - run: + name: yarn + command: yarn --frozen-lockfile install || yarn --frozen-lockfile install + - run: yarn build:ci:no_website + - save_cache: + key: repo-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo + build-website: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: cd packages/website && yarn build + test-contracts-ganache: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci contracts + test-contracts-geth: + docker: + - image: circleci/node:9 + - image: 0xorg/devnet + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is + # initialized + - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts + test-publish: + resource_class: medium+ + docker: + - image: circleci/node:9 + - image: 0xorg/verdaccio + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:publish:circleci + test-doc-generation: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:generate_docs:circleci + test-rest: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci @0xproject/abi-gen + - run: yarn wsrun test:circleci @0xproject/assert + - run: yarn wsrun test:circleci @0xproject/base-contract + - run: yarn wsrun test:circleci @0xproject/connect + - run: yarn wsrun test:circleci @0xproject/contract-wrappers + - run: yarn wsrun test:circleci @0xproject/dev-utils + - run: yarn wsrun test:circleci @0xproject/json-schemas + - run: yarn wsrun test:circleci @0xproject/metacoin + - run: yarn wsrun test:circleci @0xproject/order-utils + - run: yarn wsrun test:circleci @0xproject/order-watcher + - run: yarn wsrun test:circleci @0xproject/sol-compiler + - run: yarn wsrun test:circleci @0xproject/sol-cov + - run: yarn wsrun test:circleci @0xproject/sol-doc + - run: yarn wsrun test:circleci @0xproject/sra-report + - run: yarn wsrun test:circleci @0xproject/subproviders + - run: yarn wsrun test:circleci @0xproject/web3-wrapper + - run: yarn wsrun test:circleci @0xproject/utils + - save_cache: + key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/abi-gen/coverage/lcov.info + - save_cache: + key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/assert/coverage/lcov.info + - save_cache: + key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/base-contract/coverage/lcov.info + - save_cache: + key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/connect/coverage/lcov.info + - save_cache: + key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/contract-wrappers/coverage/lcov.info + - save_cache: + key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/dev-utils/coverage/lcov.info + - save_cache: + key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/json-schemas/coverage/lcov.info + - save_cache: + key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/metacoin/coverage/lcov.info + - save_cache: + key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-utils/coverage/lcov.info + - save_cache: + key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-watcher/coverage/lcov.info + - save_cache: + key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-compiler/coverage/lcov.info + - save_cache: + key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-cov/coverage/lcov.info + - save_cache: + key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-doc/coverage/lcov.info + - save_cache: + key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sra-report/coverage/lcov.info + - save_cache: + key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/subproviders/coverage/lcov.info + - save_cache: + key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/web3-wrapper/coverage/lcov.info + static-tests: + working_directory: ~/repo + docker: + - image: circleci/node:9 + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn lerna run lint + - run: yarn prettier:ci + - run: cd packages/0x.js && yarn build:umd:prod + - run: yarn bundlesize + submit-coverage: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn report_coverage workflows: - version: 2 - main: - jobs: + version: 2 + main: + jobs: + - build + - test-contracts-ganache: + requires: - build - - test-contracts-ganache: - requires: - - build - - test-contracts-geth: - requires: - - build - - test-rest: - requires: - - build - - static-tests: - requires: - - build - - test-publish: - requires: - - build - - test-doc-generation: - requires: - - build - - submit-coverage: - requires: - - test-rest + - test-contracts-geth: + requires: + - build + - test-rest: + requires: + - build + - static-tests: + requires: + - build + - test-publish: + requires: + - build + - test-doc-generation: + requires: + - build + - submit-coverage: + requires: + - test-rest -- cgit v1.2.3 From bc067baf0d4574bc254a5d46069e7c46e320565a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 4 Oct 2018 16:44:54 +0100 Subject: Add website build to instructions --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index c04f6e3c6..31954c608 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -238,6 +238,9 @@ workflows: main: jobs: - build + - build-website: + requires: + - build - test-contracts-ganache: requires: - build -- cgit v1.2.3