From dd7acd483ee02efc11ef64586f424c5aa934a15f Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 25 Nov 2022 09:55:54 -0800 Subject: [PATCH] fix: try to fix bundle cache path --- .github/workflows/e2e-tests-readonly.yml | 6 ++---- .github/workflows/e2e-tests-readwrite.yml | 6 ++---- bin/mastodon-config.js | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-tests-readonly.yml b/.github/workflows/e2e-tests-readonly.yml index 8c60c7b2..e309d289 100644 --- a/.github/workflows/e2e-tests-readonly.yml +++ b/.github/workflows/e2e-tests-readonly.yml @@ -2,8 +2,6 @@ name: Read-only e2e tests on: pull_request: branches: [ master ] -env: - MASTODON_VERSION: 3.0.3 jobs: test: runs-on: ubuntu-18.04 @@ -34,9 +32,9 @@ jobs: - name: Cache Mastodon bundler uses: actions/cache@v3 with: - path: mastodon/vendor/bundle + path: ~/.bundle-cache # cache based on masto version implicitly defined in mastodon-config.js - key: masto-bundler-v1-${{ hashFiles('bin/mastodon-config.js') }} + key: masto-bundler-v2-${{ hashFiles('bin/mastodon-config.js') }} - name: Cache Mastodon's and our yarn uses: actions/cache@v3 with: diff --git a/.github/workflows/e2e-tests-readwrite.yml b/.github/workflows/e2e-tests-readwrite.yml index dd1d0357..719d746d 100644 --- a/.github/workflows/e2e-tests-readwrite.yml +++ b/.github/workflows/e2e-tests-readwrite.yml @@ -2,8 +2,6 @@ name: Read-write e2e tests on: pull_request: branches: [ master ] -env: - MASTODON_VERSION: 3.0.3 jobs: test: runs-on: ubuntu-18.04 @@ -34,9 +32,9 @@ jobs: - name: Cache Mastodon bundler uses: actions/cache@v3 with: - path: mastodon/vendor/bundle + path: ~/.bundle-cache # cache based on masto version implicitly defined in mastodon-config.js - key: masto-bundler-v1-${{ hashFiles('bin/mastodon-config.js') }} + key: masto-bundler-v2-${{ hashFiles('bin/mastodon-config.js') }} - name: Cache Mastodon's and our yarn uses: actions/cache@v3 with: diff --git a/bin/mastodon-config.js b/bin/mastodon-config.js index fbf847a4..f5b43537 100644 --- a/bin/mastodon-config.js +++ b/bin/mastodon-config.js @@ -29,7 +29,7 @@ export const mastodonDir = path.join(__dirname, '../mastodon') export const env = Object.assign({}, process.env, { RAILS_ENV: 'development', NODE_ENV: 'development', - BUNDLE_PATH: path.join(mastodonDir, 'vendor/bundle'), + BUNDLE_PATH: process.env.CI ? path.join(__dirname, '../.bundle-cache') : path.join(mastodonDir, 'vendor/bundle'), DB_NAME, DB_USER, DB_PASS,