Skip to content

Commit 9febddb

Browse files
committed
Update CI workflows for node-renderer package and Node.js version pinning
- Pin Node.js to 22.11.0/22.12.x to avoid V8 bug #56010 - Update Pro test workflow to use node-renderer package location - Update Pro lint workflow to build react-on-rails before linting - Update Playwright workflow yarn commands - Fix cache paths for workspace structure
1 parent 5404176 commit 9febddb

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ jobs:
9595
- name: Setup Node
9696
uses: ./.github/actions/setup-node-with-retry
9797
with:
98-
node-version: 22
98+
# Pin to 22.12.x (LTS) - V8 bug from issue #56010 was fixed in 22.12.0
99+
# https://github.com/nodejs/node/issues/56010
100+
node-version: '22.12.x'
99101
cache: yarn
100102
cache-dependency-path: 'react_on_rails_pro/**/yarn.lock'
101103

@@ -191,7 +193,9 @@ jobs:
191193
- name: Setup Node
192194
uses: ./.github/actions/setup-node-with-retry
193195
with:
194-
node-version: 22
196+
# Pin to 22.12.x (LTS) - V8 bug from issue #56010 was fixed in 22.12.0
197+
# https://github.com/nodejs/node/issues/56010
198+
node-version: '22.12.x'
195199
cache: yarn
196200
cache-dependency-path: 'react_on_rails_pro/**/yarn.lock'
197201

@@ -388,7 +392,9 @@ jobs:
388392
- name: Setup Node
389393
uses: ./.github/actions/setup-node-with-retry
390394
with:
391-
node-version: 22
395+
# Pin to 22.12.x (LTS) - V8 bug from issue #56010 was fixed in 22.12.0
396+
# https://github.com/nodejs/node/issues/56010
397+
node-version: '22.12.x'
392398
cache: yarn
393399
cache-dependency-path: 'react_on_rails_pro/**/yarn.lock'
394400

.github/workflows/pro-lint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ jobs:
9393
- name: Setup Node
9494
uses: ./.github/actions/setup-node-with-retry
9595
with:
96-
node-version: 22
96+
# Pin to 22.11.0 (LTS) to avoid V8 bug in 22.21.0
97+
# https://github.com/nodejs/node/issues/56010
98+
node-version: '22.11.0'
9799
cache: yarn
98100
cache-dependency-path: 'react_on_rails_pro/**/yarn.lock'
99101

@@ -159,6 +161,10 @@ jobs:
159161
- name: Generate file-system based entrypoints
160162
run: cd spec/dummy && bundle exec rake react_on_rails:generate_packs
161163

164+
- name: Build react-on-rails package (required for Pro eslint import resolution)
165+
working-directory: .
166+
run: yarn workspace react-on-rails-pro build
167+
162168
- name: Lint Ruby
163169
run: bundle exec rubocop --ignore-parent-exclusion
164170

.github/workflows/pro-test-package-and-gem.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ jobs:
9595
- name: Setup Node
9696
uses: ./.github/actions/setup-node-with-retry
9797
with:
98-
node-version: 22
98+
# Pin to 22.11.0 (LTS) to avoid V8 bug in 22.21.0
99+
# https://github.com/nodejs/node/issues/56010
100+
node-version: '22.11.0'
99101
cache: yarn
100-
cache-dependency-path: 'react_on_rails_pro/**/yarn.lock'
102+
cache-dependency-path: '**/yarn.lock'
101103

102104
- name: Print system information
103105
run: |
@@ -196,9 +198,11 @@ jobs:
196198
- name: Setup Node
197199
uses: ./.github/actions/setup-node-with-retry
198200
with:
199-
node-version: 22
201+
# Pin to 22.11.0 (LTS) to avoid V8 bug in 22.21.0
202+
# https://github.com/nodejs/node/issues/56010
203+
node-version: '22.11.0'
200204
cache: yarn
201-
cache-dependency-path: 'react_on_rails_pro/**/yarn.lock'
205+
cache-dependency-path: '**/yarn.lock'
202206

203207
- name: Print system information
204208
run: |
@@ -214,29 +218,14 @@ jobs:
214218
path: react_on_rails_pro/node_modules
215219
key: v4-pro-package-node-modules-cache-${{ hashFiles('react_on_rails_pro/yarn.lock') }}
216220

217-
- name: Remove old webpack bundles
218-
run: |
219-
rm -rf spec/dummy/public/webpack
220-
rm -rf spec/dummy/ssr-generated
221-
222-
- id: get-sha
223-
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
224-
225-
- name: Restore test webpack bundles from cache
226-
uses: actions/cache@v4
227-
with:
228-
path: |
229-
react_on_rails_pro/spec/dummy/public/webpack/test
230-
react_on_rails_pro/spec/dummy/ssr-generated
231-
key: v4-pro-dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}
232-
233221
- name: Install Node modules with Yarn for Pro package
222+
working-directory: .
234223
run: |
235224
sudo yarn global add yalc
236225
yarn install --frozen-lockfile --no-progress --no-emoji
237226
238227
- name: Run JS unit tests for Pro package
239-
run: yarn run nps test.ci
228+
run: yarn workspace react-on-rails-pro-node-renderer run ci
240229
env:
241230
JEST_JUNIT_OUTPUT_DIR: ./jest
242231
JEST_JUNIT_ADD_FILE_ATTRIBUTE: "true"
@@ -246,10 +235,10 @@ jobs:
246235
if: always()
247236
with:
248237
name: pro-jest-results
249-
path: react_on_rails_pro/jest
238+
path: packages/react-on-rails-pro-node-renderer/jest
250239

251240
# RSpec tests for Pro package
252-
rspec-package-specs:
241+
rspec-gem-specs:
253242
needs: detect-changes
254243
if: |
255244
!(

0 commit comments

Comments
 (0)