diff --git a/.circleci/config.yml b/.circleci/config.yml index 2601d0c..fce782d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,27 +1,40 @@ --- version: 2 jobs: - build: - working_directory: /cli + node-latest: &test-build docker: - - image: node:8 + - image: node:latest + working_directory: /cli steps: - checkout - restore_cache: keys: - - v2-yarn-{{ .Branch }}-{{checksum "yarn.lock"}} - - v2-yarn-{{ .Branch }} - - v2-yarn-master + - v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{checksum "yarn.lock"}} + - v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}- + - v0-yarn-{{ .Environment.CIRCLE_JOB }}-master- - run: yarn - - run: {command: "./bin/run version", when: always} - - run: - when: always - command: | - npx jest --coverage --runInBand - bash <(curl -s https://codecov.io/bash) + - run: ./bin/run version + - run: yarn test --coverage + - run: curl -s https://codecov.io/bash | bash - save_cache: - key: v2-yarn-{{ .Branch }}-{{checksum "yarn.lock"}} + key: v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{checksum "yarn.lock"}} paths: - /cli/node_modules - - /cli/npm-packages-offline-cache - /usr/local/share/.cache/yarn + - /root/.cache/cli-engine/yarn + node-8: + <<: *test-build + docker: + - image: node:8 + node-6: + <<: *test-build + docker: + - image: node:6 + +workflows: + version: 2 + test: + jobs: + - node-latest + - node-8 + - node-6