Skip to content

Commit 8ff6cd2

Browse files
justin808claude
andcommitted
ci: address review feedback and fix bundler-cache test failures
- Move `Fix dependency for libyaml-dev` before bundler-cache steps in benchmark.yml so psych v5 native extensions can build during cache miss. - Add explicit `cache-version: precompile` in precompile-check.yml so all workflows set the cache-version key consistently. - Add `BUNDLE_DISABLE_CHECKSUM_VALIDATION: 'true'` to the job env: in all three pro-integration-tests jobs to match pro-lint.yml and pro-test-package-and-gem.yml when bundler-cache runs `bundle install --frozen`. - Override `BUNDLE_FROZEN`/`BUNDLE_DEPLOYMENT` to false in the `dummy_no_turbolinks` rake task. The task removes turbolinks from the Gemfile via the `DISABLE_TURBOLINKS` env var, so the lockfile diverges and bundler-cache's frozen mode refuses to load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 39608c6 commit 8ff6cd2

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ jobs:
198198
# STEP 3: START APPLICATION SERVER
199199
# ============================================
200200

201+
# libyaml-dev is needed for psych v5 native extensions; install before any
202+
# bundler-cache step so bundle install can compile psych if required.
203+
- name: Fix dependency for libyaml-dev
204+
run: sudo apt install libyaml-dev -y
205+
201206
- name: Setup Ruby
202207
uses: ruby/setup-ruby@v1
203208
with:
@@ -238,9 +243,6 @@ jobs:
238243
if: steps.cache-foreman.outputs.cache-hit != 'true'
239244
run: gem install foreman
240245

241-
- name: Fix dependency for libyaml-dev
242-
run: sudo apt install libyaml-dev -y
243-
244246
# Follow https://github.com/pnpm/action-setup?tab=readme-ov-file#use-cache-to-reduce-installation-time
245247
- name: Setup pnpm
246248
uses: pnpm/action-setup@v4

.github/workflows/precompile-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
bundler: 2.5.9
9292
working-directory: react_on_rails/spec/dummy
9393
bundler-cache: true
94+
cache-version: precompile
9495
- name: Setup Node
9596
uses: actions/setup-node@v4
9697
with:

.github/workflows/pro-integration-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191
runs-on: ubuntu-22.04
9292
env:
9393
REACT_ON_RAILS_PRO_LICENSE: ${{ secrets.REACT_ON_RAILS_PRO_LICENSE_V2 }}
94+
BUNDLE_DISABLE_CHECKSUM_VALIDATION: 'true'
9495
steps:
9596
- uses: actions/checkout@v4
9697
with:
@@ -187,6 +188,7 @@ jobs:
187188
runs-on: ubuntu-22.04
188189
env:
189190
REACT_ON_RAILS_PRO_LICENSE: ${{ secrets.REACT_ON_RAILS_PRO_LICENSE_V2 }}
191+
BUNDLE_DISABLE_CHECKSUM_VALIDATION: 'true'
190192
steps:
191193
- uses: actions/checkout@v4
192194
with:
@@ -359,6 +361,7 @@ jobs:
359361
runs-on: ubuntu-22.04
360362
env:
361363
REACT_ON_RAILS_PRO_LICENSE: ${{ secrets.REACT_ON_RAILS_PRO_LICENSE_V2 }}
364+
BUNDLE_DISABLE_CHECKSUM_VALIDATION: 'true'
362365
# Redis service container
363366
services:
364367
redis:

react_on_rails/rakelib/run_rspec.rake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ namespace :run_rspec do
6969
env_vars_array = []
7070
env_vars_array << rbs_runtime_env_vars unless rbs_runtime_env_vars.empty?
7171
env_vars_array << "DISABLE_TURBOLINKS=TRUE"
72+
# DISABLE_TURBOLINKS makes the Gemfile diverge from Gemfile.lock (drops the
73+
# turbolinks gem), so bundler refuses to load under frozen/deployment mode
74+
# that ruby/setup-ruby's bundler-cache enables in CI.
75+
env_vars_array << "BUNDLE_FROZEN=false"
76+
env_vars_array << "BUNDLE_DEPLOYMENT=false"
7277
env_vars = env_vars_array.join(" ")
7378
run_tests_in(spec_dummy_dir,
7479
env_vars: env_vars,

0 commit comments

Comments
 (0)