Skip to content

Commit

Permalink
Fix dependency caching in CircleCI
Browse files Browse the repository at this point in the history
CircleCI will not overwrite a cache key that already exists, so we
need to ensure cache keys are unique. Otherwise, adding new gems
will make the build fail because they won't be installed.
  • Loading branch information
aldesantis committed Jan 16, 2020
1 parent 6ee7482 commit 0e46de3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ jobs:
- checkout
- restore_cache:
keys:
- renderful-v1-{{ .Branch }}-{{ .Revision }}
- renderful-v1-{{ .Branch }}
- renderful-v1-
- run:
name: Bundle Install
command: bundle check || bundle install
- save_cache:
key: renderful-v1-{{ .Branch }}
key: renderful-v1-{{ .Branch }}-{{ .Revision }}
paths:
- vendor/bundle

Expand All @@ -29,8 +30,7 @@ jobs:
- checkout
- restore_cache:
keys:
- renderful-v1-{{ .Branch }}
- renderful-v1-
- renderful-v1-{{ .Branch }}-{{ .Revision }}
- run:
name: Run RSpec
command: |
Expand All @@ -51,8 +51,7 @@ jobs:
- checkout
- restore_cache:
keys:
- renderful-v1-{{ .Branch }}
- renderful-v1-
- renderful-v1-{{ .Branch }}-{{ .Revision }}
- run:
name: Run RuboCop
command: bundle exec rubocop
Expand Down

0 comments on commit 0e46de3

Please sign in to comment.