diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-06-01 02:02:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-01 02:02:56 +0800 |
commit | c284f6dcd4e10388e0dd474be08788ddef6b4f30 (patch) | |
tree | a2c6835a84417597fddc63ac409c3cf988df9e45 /.circleci | |
parent | a11d139ff66fb18df225d4fb1a932ded94c6b5fa (diff) | |
parent | bfefb6e696bc7b31a9f541edb32afc2f986b9184 (diff) | |
download | dexon-sol-tools-c284f6dcd4e10388e0dd474be08788ddef6b4f30.tar.gz dexon-sol-tools-c284f6dcd4e10388e0dd474be08788ddef6b4f30.tar.zst dexon-sol-tools-c284f6dcd4e10388e0dd474be08788ddef6b4f30.zip |
Merge pull request #624 from 0xProject/feature/fast-ci2
Rebalance CI tests to run faster
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 129 |
1 files changed, 47 insertions, 82 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index ab42ade09..c544bb484 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: build: docker: - - image: circleci/node:6.12 + - image: circleci/node:9 environment: CONTRACTS_COMMIT_HASH: '9ed05f5' working_directory: ~/repo @@ -11,91 +11,68 @@ jobs: - checkout - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - restore_cache: - key: dependency-cache-{{ checksum "package.json" }} + name: Restore Yarn Package Cache + keys: + - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} + - yarn-packages-{{ .Branch }} + - yarn-packages-master + - yarn-packages- - run: name: yarn - command: yarn --frozen-lockfile + command: yarn --frozen-lockfile install - save_cache: - key: dependency-cache-{{ checksum "package.json" }} + name: Save Yarn Package Cache + key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} paths: - - ./node_modules - - run: wget https://s3.amazonaws.com/testrpc-shapshots/${CONTRACTS_COMMIT_HASH}.zip - - run: unzip ${CONTRACTS_COMMIT_HASH}.zip -d testrpc_snapshot + - node_modules/ - run: node ./node_modules/lerna/bin/lerna.js bootstrap - run: yarn build - save_cache: key: repo-{{ .Environment.CIRCLE_SHA1 }} paths: - ~/repo - test-installation: - docker: - - image: circleci/node:6.12 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:installation - test-0xjs: + test-1: docker: - - image: circleci/node:6.12 + - image: circleci/node:9 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 wsrun test:circleci 0x.js + - run: yarn wsrun test:circleci @0xproject/contract-wrappers + - run: yarn wsrun test:circleci @0xproject/sol-compiler - save_cache: - key: coverage-0xjs-{{ .Environment.CIRCLE_SHA1 }} + key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/contract-wrappers/coverage/lcov.info + - save_cache: + key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} paths: - - ~/repo/packages/0x.js/coverage/lcov.info + - ~/repo/packages/sol-compiler/coverage/lcov.info test-contracts: docker: - - image: circleci/node:6.12 + - image: circleci/node:9 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 wsrun test:circleci contracts - test-sol-compiler: + test-2: docker: - - image: circleci/node:6.12 + - image: circleci/node:9 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 wsrun test:circleci @0xproject/sol-compiler - - save_cache: - key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-compiler/coverage/lcov.info - 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 wsrun test:circleci --exclude contracts --exclude 0x.js --exclude @0xproject/sol-compiler --stages --exclude-missing + - run: yarn wsrun test:circleci @0xproject/assert + - run: yarn wsrun test:circleci @0xproject/connect + - run: yarn wsrun test:circleci @0xproject/dev-utils + - run: yarn wsrun test:circleci @0xproject/json-schemas + - run: yarn wsrun test:circleci @0xproject/subproviders + - run: yarn wsrun test:circleci @0xproject/sol-cov + - run: yarn wsrun test:circleci @0xproject/metacoin - save_cache: key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} paths: @@ -124,27 +101,19 @@ jobs: key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} paths: - ~/repo/packages/metacoin/coverage/lcov.info - lint: - working_directory: ~/repo - docker: - - image: circleci/node:6.12 - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn lerna:run lint - prettier: + static-tests: working_directory: ~/repo docker: - - image: circleci/node:6.12 + - image: circleci/node:9 steps: - restore_cache: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn prettier:ci + - run: yarn lerna:run lint submit-coverage: docker: - - image: circleci/node:6.12 + - image: circleci/node:9 working_directory: ~/repo steps: - restore_cache: @@ -158,6 +127,9 @@ jobs: - 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: @@ -170,6 +142,9 @@ jobs: - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - restore_cache: keys: + - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - restore_cache: keys: @@ -183,29 +158,19 @@ workflows: main: jobs: - build - # - test-installation: - # requires: - # - build - - test-0xjs: + - test-1: requires: - build - - test-contracts: + - test-2: requires: - build - - test-sol-compiler: - requires: - - build - - test-rest: - requires: - - build - - prettier: + - test-contracts: requires: - build - - lint: + - static-tests: requires: - build - submit-coverage: requires: - - test-0xjs - - test-sol-compiler - - test-rest + - test-1 + - test-2 |