Skip to content

Commit a780f5d

Browse files
authored
chore(REACH-717): test with different node versions (16, 18, 20) (#98)
Release with latest node version 20
1 parent 6652cb5 commit a780f5d

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/pr.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ on:
77

88
jobs:
99
build-lint-test:
10-
name: build-lint-test
1110
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node_version:
14+
- 16 # end of life 2023-09-11
15+
- 18 # end of life 2025-04-30
16+
- 20 # end of life 2025-04-30
17+
name: build-lint-test - node ${{ matrix.node_version }}
1218
steps:
1319
- name: Check out Git repository
1420
uses: actions/checkout@v3
1521

1622
- name: Set up Node.js
1723
uses: actions/setup-node@v3
1824
with:
19-
node-version: 16
25+
node-version: ${{ matrix.node_version }}
2026

2127
- name: Get yarn cache
2228
uses: actions/cache@v3
@@ -25,10 +31,11 @@ jobs:
2531
path: |
2632
**/node_modules
2733
~/.cache
28-
key: ${{ runner.os }}-node-16-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('.github/workflows/**.yml') }}
34+
key: ${{ runner.os }}-repo-${{ github.event.pull_request.head.repo.full_name }}-node-${{ matrix.node_version }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('.github/workflows/**.yml') }}
2935

3036
- name: Install Node.js dependencies
31-
if: steps.yarn-cache.outputs.cache-hit != 'true'
37+
# run when cache not found or PR is external (build fails for external PRs if dependencies are not installed)
38+
if: steps.yarn-cache.outputs.cache-hit != 'true' || github.event.pull_request.head.repo.full_name != github.repository
3239
run: yarn install --frozen-lockfile
3340

3441
- name: Build

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Node.js
1818
uses: actions/setup-node@v3
1919
with:
20-
node-version: 16
20+
node-version: 20
2121

2222
- name: Get yarn cache
2323
uses: actions/cache@v3

0 commit comments

Comments
 (0)