Skip to content

Commit 8950d0c

Browse files
[CI][workflows] Use node 20, 22 in workflows
Add node 20,22 for build and tests (keep 18 for now). Use 20 for publish and license check. Signed-off-by: Marc Dumais <[email protected]>
1 parent 330403d commit 8950d0c

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

.github/workflows/ci-cd.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,25 @@ on:
1414

1515
jobs:
1616
build:
17+
name: Build and Test (${{ matrix.os }}, node-${{ matrix.node-version }})
1718
runs-on: ${{ matrix.os }}
1819

1920
strategy:
2021
fail-fast: false
2122
matrix:
2223
os: [ubuntu-latest]
23-
node: [18]
24+
node-version: [18, 20, 22]
2425

2526
steps:
2627
- name: Checkout
2728
uses: actions/checkout@v4
2829
with:
2930
persist-credentials: false
3031

31-
- name: Use Node.js ${{ matrix.node }}
32+
- name: Use Node.js ${{ matrix.node-version }}
3233
uses: actions/setup-node@v4
3334
with:
34-
node-version: ${{ matrix.node }}
35+
node-version: ${{ matrix.node-version }}
3536
registry-url: 'https://registry.npmjs.org'
3637

3738
- name: Build
@@ -50,25 +51,27 @@ jobs:
5051
NODE_OPTIONS: "--max_old_space_size=4096"
5152

5253
publish-next:
54+
name: Publish to npm (next) (${{ matrix.os }})
5355
needs: build
5456
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/timeline-chart'
5557

56-
runs-on: ubuntu-latest
58+
runs-on: ${{ matrix.os }}
5759

5860
strategy:
5961
matrix:
60-
node: [18]
62+
os: [ubuntu-latest]
63+
node-version: [20]
6164

6265
steps:
6366
- name: Checkout
6467
uses: actions/checkout@v4
6568
with:
6669
persist-credentials: false
6770

68-
- name: Use Node.js ${{ matrix.node }}
71+
- name: Use Node.js ${{ matrix.node-version}}
6972
uses: actions/setup-node@v4
7073
with:
71-
node-version: ${{ matrix.node }}
74+
node-version: ${{ matrix.node-version }}
7275
registry-url: 'https://registry.npmjs.org'
7376

7477
- name: Pre-Publish
@@ -91,21 +94,23 @@ jobs:
9194
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # The variable name comes from here: https://github.com/actions/setup-node/blob/70b9252472eee7495c93bb1588261539c3c2b98d/src/authutil.ts#L48
9295

9396
publish-latest:
97+
name: Publish to npm (latest) (${{ matrix.os }})
9498
needs: build
9599
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'eclipse-cdt-cloud/timeline-chart'
96-
runs-on: ubuntu-latest
100+
runs-on: ${{ matrix.os }}
97101
strategy:
98102
matrix:
99-
node: [18]
103+
os: [ubuntu-latest]
104+
node-version: [20]
100105
steps:
101106
- name: Checkout
102107
uses: actions/checkout@v3
103108
with:
104109
persist-credentials: false
105-
- name: Use Node.js ${{ matrix.node }}
110+
- name: Use Node.js ${{ matrix.node-version }}
106111
uses: actions/setup-node@v3
107112
with:
108-
node-version: ${{ matrix.node }}
113+
node-version: ${{ matrix.node-version }}
109114
registry-url: 'https://registry.npmjs.org'
110115
- name: Pre-Publish
111116
shell: bash

.github/workflows/license-check-workflow.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ on:
1414
jobs:
1515

1616
License-check:
17-
name: 3PP License Check using dash-licenses
17+
name: 3PP License Check using dash-licenses (${{ matrix.os }})
1818

1919
strategy:
2020
fail-fast: false
2121
matrix:
2222
os: [ubuntu-latest]
23-
node: [18]
23+
node-version: [20]
2424
java: [11]
2525

2626
runs-on: ${{ matrix.os }}
@@ -35,7 +35,7 @@ jobs:
3535
- name: Use Node.js ${{ matrix.node }}
3636
uses: actions/setup-node@v4
3737
with:
38-
node-version: ${{ matrix.node }}
38+
node-version: ${{ matrix.node-version }}
3939

4040
- name: Use Java ${{ matrix.java }}
4141
uses: actions/setup-java@v3

0 commit comments

Comments
 (0)