From d3ce112f60b6180b816229e1b849833890dd68af Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 23 Nov 2020 18:07:38 -0800 Subject: [PATCH] chore: fix bundler caching in circleci (#1899) --- .circleci/config.yml | 8 ++++---- bin/run-mastodon.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 68390ec8..f7bb291f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ jobs: command: node -v - restore_cache: name: Restore yarn cache - key: dependency-cache-{{ checksum "yarn.lock" }} + key: yarn-v1-{{ checksum "yarn.lock" }} - run: name: Yarn install command: yarn install --immutable @@ -39,7 +39,7 @@ jobs: command: yarn clone-mastodon - restore_cache: name: Restore bundler cache - key: bundler-{{ checksum "mastodon/Gemfile.lock" }} + key: bundler-v2-{{ checksum "mastodon/Gemfile.lock" }} - run: name: Lint command: yarn lint @@ -73,11 +73,11 @@ jobs: yarn test - save_cache: name: Save yarn cache - key: dependency-cache-{{ checksum "yarn.lock" }} + key: yarn-v1-{{ checksum "yarn.lock" }} paths: - ~/.cache/yarn - save_cache: name: Save bundler cache - key: bundler-{{ checksum "mastodon/Gemfile.lock" }} + key: bundler-v2-{{ checksum "mastodon/Gemfile.lock" }} paths: - mastodon/vendor/bundle diff --git a/bin/run-mastodon.js b/bin/run-mastodon.js index 2821dcde..60adf310 100644 --- a/bin/run-mastodon.js +++ b/bin/run-mastodon.js @@ -59,7 +59,7 @@ async function runMastodon () { const cwd = mastodonDir const cmds = [ 'gem install bundler foreman', - 'bundle install --frozen', + 'bundle install --frozen --path vendor/bundle', 'bundle exec rails db:migrate', 'yarn --pure-lockfile' ]