Skip to content

Commit 8f19230

Browse files
committed
install with node 18 to avoid issues
1 parent d5ccf2e commit 8f19230

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/actions/restore-cache/action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ inputs:
55
dependency_cache_key:
66
description: "The dependency cache key"
77
required: true
8+
node_version:
9+
description: "If set, temporarily set node version to 18 before installing, then revert to this version after."
10+
required: false
811

912
runs:
1013
using: "composite"
@@ -22,7 +25,19 @@ runs:
2225
with:
2326
name: build-output
2427

28+
- name: Set node version
29+
if: inputs.node_version
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version-file: 'package.json'
33+
2534
- name: Install dependencies
2635
if: steps.dep-cache.outputs.cache-hit != 'true'
2736
run: yarn install --ignore-engines --frozen-lockfile
2837
shell: bash
38+
39+
- name: Revert node version
40+
if: inputs.node_version
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: ${{ inputs.node_version }}

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ jobs:
477477
uses: ./.github/actions/restore-cache
478478
with:
479479
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
480+
node_version: ${{ matrix.node == 14 && '14' || '' }}
480481

481482
- name: Run affected tests
482483
run: yarn test:pr:node --base=${{ github.event.pull_request.base.sha }}
@@ -709,6 +710,7 @@ jobs:
709710
uses: ./.github/actions/restore-cache
710711
with:
711712
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
713+
node_version: ${{ matrix.node == 14 && '14' || '' }}
712714

713715
- name: Overwrite typescript version
714716
if: matrix.typescript

0 commit comments

Comments
 (0)