From 212a2d229a975da46e5b0920ec6d0d41b3c0b6e3 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Fri, 12 Jul 2019 14:11:53 -0400 Subject: [PATCH] This one weird trick cuts contract test runtime by over 50% in CI (#1941) * CI: Collapse each test task to a single wsrun call * Restore test-rest to invoking wsrun many times --- .circleci/config.yml | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a387f40e6d..5ffeb018f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,18 +51,7 @@ jobs: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci @0x/contracts-multisig - - run: yarn wsrun test:circleci @0x/contracts-utils - - run: yarn wsrun test:circleci @0x/contracts-exchange-libs - - run: yarn wsrun test:circleci @0x/contracts-erc20 - - run: yarn wsrun test:circleci @0x/contracts-erc721 - - run: yarn wsrun test:circleci @0x/contracts-erc1155 - - run: yarn wsrun test:circleci @0x/contracts-extensions - - run: yarn wsrun test:circleci @0x/contracts-asset-proxy - - run: yarn wsrun test:circleci @0x/contracts-exchange - - run: yarn wsrun test:circleci @0x/contracts-exchange-forwarder - - run: yarn wsrun test:circleci @0x/contracts-coordinator - - run: yarn wsrun test:circleci @0x/contracts-dev-utils + - run: yarn wsrun test:circleci @0x/contracts-multisig @0x/contracts-utils @0x/contracts-exchange-libs @0x/contracts-erc20 @0x/contracts-erc721 @0x/contracts-erc1155 @0x/contracts-extensions @0x/contracts-asset-proxy @0x/contracts-exchange @0x/contracts-exchange-forwarder @0x/contracts-coordinator @0x/contracts-dev-utils test-contracts-geth: docker: - image: circleci/node:9-browsers @@ -74,18 +63,7 @@ jobs: - 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 @0x/contracts-multisig - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-utils - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-exchange-libs - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-erc20 - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-erc721 - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-erc1155 - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-extensions - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-asset-proxy - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-exchange - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-exchange-forwarder - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-coordinator - - run: TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-dev-utils + - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test:circleci @0x/contracts-multisig @0x/contracts-utils @0x/contracts-exchange-libs @0x/contracts-erc20 @0x/contracts-erc721 @0x/contracts-erc1155 @0x/contracts-extensions @0x/contracts-asset-proxy @0x/contracts-exchange @0x/contracts-exchange-forwarder @0x/contracts-coordinator @0x/contracts-dev-utils test-publish: resource_class: medium+ docker: