From 835fa0af131f8a0deeb6dc1030e584687f336332 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 13:44:38 +0100 Subject: Test workflow --- .circleci/config.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 85b055571..e64f4b5b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,10 +20,30 @@ jobs: - run: unzip ${CONTRACTS_COMMIT_HASH}.zip -d testrpc_snapshot - run: node ./node_modules/lerna/bin/lerna.js bootstrap - run: yarn lerna:run build + test: + steps: - run: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - run: yarn lerna:run test:circleci + lint: + steps: - run: yarn lerna:run lint + prettier: + steps: - run: yarn prettier:ci +workflows: + version: 2 + main: + jobs: + - build + - test: + requires: + - build + - lint: + requires: + - build + - prettier: + requires: + - build -- cgit v1.2.3 From 593f7e826ce7ae2c8725fcc572f2c1d9955b296f Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 13:45:36 +0100 Subject: Specify the executor --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index e64f4b5b7..45af8de7d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,6 +21,8 @@ jobs: - run: node ./node_modules/lerna/bin/lerna.js bootstrap - run: yarn lerna:run build test: + docker: + - image: circleci/node:6.12 steps: - run: name: testrpc @@ -28,9 +30,13 @@ jobs: background: true - run: yarn lerna:run test:circleci lint: + docker: + - image: circleci/node:6.12 steps: - run: yarn lerna:run lint prettier: + docker: + - image: circleci/node:6.12 steps: - run: yarn prettier:ci workflows: -- cgit v1.2.3 From 6bc0e815e965921e6f3e02bf921ce01d5fad10e2 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 13:54:13 +0100 Subject: Add caching between steps --- .circleci/config.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 45af8de7d..84f3dc947 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,7 @@ jobs: - image: circleci/node:6.12 environment: CONTRACTS_COMMIT_HASH: '9ed05f5' + working_directory: ~/repo steps: - checkout - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV @@ -20,24 +21,40 @@ jobs: - run: unzip ${CONTRACTS_COMMIT_HASH}.zip -d testrpc_snapshot - run: node ./node_modules/lerna/bin/lerna.js bootstrap - run: yarn lerna:run build + - save_cache: + key: repo-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo test: docker: - image: circleci/node:6.12 + working_directory: ~/repo steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - run: yarn lerna:run test:circleci lint: + working_directory: ~/repo docker: - image: circleci/node:6.12 steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn lerna:run lint prettier: + working_directory: ~/repo docker: - image: circleci/node:6.12 steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn prettier:ci workflows: version: 2 -- cgit v1.2.3 From 1ccb97861273838523bf2e58c1ee8056605c259b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 14:04:02 +0100 Subject: Split tests into two bundles --- .circleci/config.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 84f3dc947..da3b4d386 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,7 +25,7 @@ jobs: key: repo-{{ .Environment.CIRCLE_SHA1 }} paths: - ~/repo - test: + test-0xjs: docker: - image: circleci/node:6.12 working_directory: ~/repo @@ -37,7 +37,20 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run test:circleci + - run: yarn lerna:run --scope 0x.js test:circleci + test-rest: + docker: + - image: circleci/node:6.12 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: + name: testrpc + command: npm run testrpc -- --db testrpc_snapshot + background: true + - run: yarn lerna:run --ignore 0x.js test:circleci lint: working_directory: ~/repo docker: @@ -61,7 +74,10 @@ workflows: main: jobs: - build - - test: + - test-0xjs: + requires: + - build + - test-rest: requires: - build - lint: -- cgit v1.2.3 From ae8cb2e6a8fc4bcd49fd4713308590a97c54556f Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 14:05:11 +0100 Subject: Don't run testrpc for the rest of the tests --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index da3b4d386..66dabcea5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,10 +46,6 @@ jobs: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: - name: testrpc - command: npm run testrpc -- --db testrpc_snapshot - background: true - run: yarn lerna:run --ignore 0x.js test:circleci lint: working_directory: ~/repo -- cgit v1.2.3 From 3ebd8b7f45e1e6f7bf15cc731d291766d836ddac Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 14:11:17 +0100 Subject: Revert "Don't run testrpc for the rest of the tests" This reverts commit ae8cb2e6a8fc4bcd49fd4713308590a97c54556f. --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 66dabcea5..da3b4d386 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,6 +46,10 @@ jobs: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: + name: testrpc + command: npm run testrpc -- --db testrpc_snapshot + background: true - run: yarn lerna:run --ignore 0x.js test:circleci lint: working_directory: ~/repo -- cgit v1.2.3 From 8a7496381541afc38687b0a1561a3cd8bb5f9918 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 14:31:28 +0100 Subject: Respore dependency cache --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index da3b4d386..40650c539 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,8 @@ jobs: steps: - checkout - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV + - restore_cache: + key: dependency-cache-{{ checksum "package.json" }} - run: name: yarn command: yarn -- cgit v1.2.3 From 7c1c94d39bfb9ff7872de7a6435ac52e94de4ec1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 14:36:04 +0100 Subject: Change cached directory --- .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 40650c539..0416fae84 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: - save_cache: key: dependency-cache-{{ checksum "package.json" }} paths: - - ~/.cache/yarn + - ./node_modules - run: wget https://s3.amazonaws.com/testrpc-shapshots/${CONTRACTS_COMMIT_HASH}.zip - run: unzip ${CONTRACTS_COMMIT_HASH}.zip -d testrpc_snapshot - run: node ./node_modules/lerna/bin/lerna.js bootstrap -- cgit v1.2.3 From 9521bf8d4fd769712702169ef1ea4ee6296d1ca8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 15:20:15 +0100 Subject: Separate contracts tests from others --- .circleci/config.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 0416fae84..47cf0af16 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,7 +40,7 @@ jobs: command: npm run testrpc -- --db testrpc_snapshot background: true - run: yarn lerna:run --scope 0x.js test:circleci - test-rest: + test-contracts: docker: - image: circleci/node:6.12 working_directory: ~/repo @@ -52,7 +52,16 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --ignore 0x.js test:circleci + - run: yarn lerna:run --scope contracts test:circleci + test-rest: + docker: + - image: circleci/node:6.12 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn lerna:run --ignore contracts,0x.js test:circleci lint: working_directory: ~/repo docker: @@ -79,6 +88,9 @@ workflows: - test-0xjs: requires: - build + - test-contracts: + requires: + - build - test-rest: requires: - build -- cgit v1.2.3 From 59f9605ed9b7aec6f7125ab8bfd5ec45dc3a07c5 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 15:26:15 +0100 Subject: Run testrpc for rest tests --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 47cf0af16..1adc4cd25 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -61,6 +61,10 @@ jobs: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: + name: testrpc + command: npm run testrpc -- --db testrpc_snapshot + background: true - run: yarn lerna:run --ignore contracts,0x.js test:circleci lint: working_directory: ~/repo -- cgit v1.2.3 From e2ca71365859aad4256fb73ffaf22df2a0a01576 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 16:03:06 +0100 Subject: Fix the glob pattern for exclusion --- .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 1adc4cd25..e391533fd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,7 +65,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --ignore contracts,0x.js test:circleci + - run: yarn lerna:run --ignore "contracts|0x.js" test:circleci lint: working_directory: ~/repo docker: -- cgit v1.2.3 From 35501dd4fc9d2034356f364447dec2e26b88557b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 16:17:20 +0100 Subject: Fix ignore configuration --- .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 e391533fd..1795a4bfc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,7 +65,7 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --ignore "contracts|0x.js" test:circleci + - run: yarn lerna:run --ignore contracts --ignore 0x.js --ignore subproviders test:circleci lint: working_directory: ~/repo docker: -- cgit v1.2.3 From 3894311d68ff2b38287154c6dc335a36e1d0be97 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 16 Jan 2018 16:36:21 +0100 Subject: Test deployer separately from contracts --- .circleci/config.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 1795a4bfc..10c5fc886 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,20 @@ jobs: name: testrpc command: npm run testrpc -- --db testrpc_snapshot background: true - - run: yarn lerna:run --scope contracts test:circleci + - run: yarn lerna:run --scope contracts test:circleci:contracts + test-deployer: + docker: + - image: circleci/node:6.12 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: + name: testrpc + command: npm run testrpc -- --db testrpc_snapshot + background: true + - run: yarn lerna:run --scope contracts test:circleci:deployer test-rest: docker: - image: circleci/node:6.12 @@ -95,12 +108,15 @@ workflows: - test-contracts: requires: - build - - test-rest: + - test-deployer: requires: - build - - lint: + - test-rest: requires: - build - prettier: requires: - build + - lint: + requires: + - build -- cgit v1.2.3 From de3bf03f42b25f65ad1baea2f85185d93ca19791 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 17 Jan 2018 15:55:58 +0100 Subject: Add --frozen-lockfile flag on CI --- .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 10c5fc886..d95940898 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: key: dependency-cache-{{ checksum "package.json" }} - run: name: yarn - command: yarn + command: yarn --frozen-lockfile - save_cache: key: dependency-cache-{{ checksum "package.json" }} paths: -- cgit v1.2.3