Use LTS nodejs in github workflows (#12726)

Currently our GH workflows all use nodejs 18, but that's not compatible with the
stated support range of matrix-js-sdk, which requires the latest LTS nodejs;
so, when we attermpt to `yarn install` on an older nodejs, we get an error.

Switch to LTS nodejs for all the places we set up nodejs.
This commit is contained in:
Richard van der Hoff 2024-07-04 10:24:02 +01:00 committed by GitHub
parent e75dc4e038
commit 1fbc97296c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View file

@ -56,6 +56,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*"
- name: Fetch layered build - name: Fetch layered build
id: layered_build id: layered_build
@ -121,6 +122,7 @@ jobs:
with: with:
cache: "yarn" cache: "yarn"
cache-dependency-path: matrix-react-sdk/yarn.lock cache-dependency-path: matrix-react-sdk/yarn.lock
node-version: "lts/*"
- name: Install dependencies - name: Install dependencies
working-directory: matrix-react-sdk working-directory: matrix-react-sdk
@ -172,6 +174,7 @@ jobs:
if: inputs.skip != true if: inputs.skip != true
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*"
- name: Install dependencies - name: Install dependencies
if: inputs.skip != true if: inputs.skip != true

View file

@ -25,6 +25,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*"
- name: Install Deps - name: Install Deps
run: "./scripts/ci/install-deps.sh" run: "./scripts/ci/install-deps.sh"
@ -83,6 +84,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*"
# Does not need branch matching as only analyses this layer # Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
@ -100,6 +102,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*"
# Does not need branch matching as only analyses this layer # Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
@ -117,6 +120,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*"
# Does not need branch matching as only analyses this layer # Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
@ -134,6 +138,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*"
- name: Install Deps - name: Install Deps
run: "scripts/ci/layered.sh" run: "scripts/ci/layered.sh"

View file

@ -44,6 +44,7 @@ jobs:
- name: Yarn cache - name: Yarn cache
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "lts/*"
cache: "yarn" cache: "yarn"
- name: Install Deps - name: Install Deps
@ -115,6 +116,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
cache: "yarn" cache: "yarn"
node-version: "lts/*"
- name: Run tests - name: Run tests
run: "./scripts/ci/app-tests.sh" run: "./scripts/ci/app-tests.sh"