Skip to content

Commit

Permalink
fix: share cache in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 27, 2018
1 parent 6087f9c commit 1a33371
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions templates/circle.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
- checkout
- restore_cache: &restore_cache
keys:
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum ".circleci/config.yml"}}-master-
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-
- v0-yarn-{{checksum ".circleci/config.yml"}}-master-
- run: ./.circleci/setup_git
- run: ./.circleci/greenkeeper
- run: yarn exec nps ci.test
- run: curl -s https://codecov.io/bash | bash
- store_test_results:
- store_test_results: &store_test_results
path: ~/cli/reports
- save_cache: &save_cache
key: v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
key: v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
paths:
- ~/cli/node_modules
- /usr/local/share/.cache/yarn
Expand All @@ -28,6 +28,14 @@ jobs:
<<: *test
docker:
- image: node:8
steps:
- checkout
- restore_cache: *restore_cache
- run: ./.circleci/setup_git
- run: ./.circleci/greenkeeper
- run: yarn exec nps ci.test
- run: curl -s https://codecov.io/bash | bash
- store_test_results: *store_test_results
<%_ if (semantic_release) { _%>
release:
<<: *test
Expand All @@ -38,7 +46,6 @@ jobs:
- run: ./.circleci/setup_git
- run: yarn --frozen-lockfile
- run: yarn exec nps ci.release
- save_cache: *save_cache
<%_ } _%>

workflows:
Expand Down

0 comments on commit 1a33371

Please sign in to comment.