Skip to content

Commit

Permalink
Improve CI caching
Browse files Browse the repository at this point in the history
- Cache .eslintcache separately; don't write it until after linting
- Better key names and fallbacks (see https://circleci.com/docs/2.0/caching/)
  • Loading branch information
jfirebaugh committed Jan 3, 2018
1 parent 8393374 commit bc207b3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,29 @@ jobs:
steps:
- checkout
- restore_cache:
key: v1-mapbox-gl-js-cache
keys:
- v1-yarn-{{ checksum "yarn.lock" }}
- v1-yarn
- restore_cache:
keys:
- v1-lint-{{ .Branch }}
- v1-lint
- run:
name: install dependencies
command: yarn
- save_cache:
key: v1-mapbox-gl-js-cache
key: v1-yarn-{{ checksum "yarn.lock" }}
paths:
- '~/.yarn'
- '.eslintcache'
- 'node_modules'
- run:
name: run tests
command: |
bash ./.circleci/test.sh
- save_cache:
key: v1-lint-{{ .Branch }}-{{ .Revision }}
paths:
- '.eslintcache'
- store_artifacts:
path: "test/integration/render-tests/index.html"
- store_artifacts:
Expand Down

0 comments on commit bc207b3

Please sign in to comment.