Skip to content

Commit

Permalink
use cache keys
Browse files Browse the repository at this point in the history
  • Loading branch information
iynere committed Mar 29, 2018
1 parent 78126ef commit 9ac3e09
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .circleci/config.yml
Expand Up @@ -8,20 +8,20 @@ jobs:
- checkout

- restore_cache:
key: yarn-{{ checksum "yarn.lock" }}-{{ arch }}
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}

- restore_cache:
key: node-{{ checksum "package.json" }}-{{ arch }}
key: node-v1-{{ checksum "package.json" }}-{{ arch }}

- run: yarn install

- save_cache:
key: yarn-{{ checksum "yarn.lock" }}-{{ arch }}
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
paths:
- ~/.cache/yarn

- save_cache:
key: node-{{ checksum "package.json" }}-{{ arch }}
key: node-v1-{{ checksum "package.json" }}-{{ arch }}
paths:
- node_modules

Expand Down Expand Up @@ -56,12 +56,12 @@ jobs:
at: ~/demo-react-native

- restore_cache:
key: bundle-{{ checksum "Gemfile.lock" }}-{{ arch }}
key: bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }}

- run: bundle install

- save_cache:
key: bundle-{{ checksum "Gemfile.lock" }}-{{ arch }}
key: bundle-v1-{{ checksum "Gemfile.lock" }}-{{ arch }}
paths:
- vendor/bundle

Expand Down Expand Up @@ -94,34 +94,34 @@ jobs:
command: echo "ruby-2.4" > ~/.ruby-version

- restore_cache:
key: yarn-{{ checksum "yarn.lock" }}-{{ arch }}
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}

- restore_cache:
key: node-{{ checksum "package.json" }}-{{ arch }}
key: node-v1-{{ checksum "package.json" }}-{{ arch }}

# not using a workspace here as Node and Yarn versions
# differ between our macOS executor image and the Docker containers above
- run: yarn install

- save_cache:
key: yarn-{{ checksum "yarn.lock" }}-{{ arch }}
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}
paths:
- ~/.cache/yarn

- save_cache:
key: node-{{ checksum "package.json" }}-{{ arch }}
key: node-v1-{{ checksum "package.json" }}-{{ arch }}
paths:
- node_modules

- restore_cache:
key: bundle-{{ checksum "ios/Gemfile.lock" }}-{{ arch }}
key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}-{{ arch }}

- run:
command: bundle install
working_directory: ios

- save_cache:
key: bundle-{{ checksum "ios/Gemfile.lock" }}-{{ arch }}
key: bundle-v1-{{ checksum "ios/Gemfile.lock" }}-{{ arch }}
paths:
- vendor/bundle

Expand Down

1 comment on commit 9ac3e09

@renatoaaa
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

``

Please sign in to comment.