Skip to content

Commit 29d9d35

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 29d9d35

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

.github/workflows/ci-cd.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,32 @@ on:
1010
workflow_dispatch:
1111
release:
1212
types:
13-
- published
13+
- published
14+
schedule:
15+
- cron: '0 4 * * *' # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
16+
1417

1518
jobs:
1619
build:
20+
name: Build and Test (${{ matrix.os }}, node-${{ matrix.node-version }})
1721
runs-on: ${{ matrix.os }}
1822

1923
strategy:
2024
fail-fast: false
2125
matrix:
2226
os: [ubuntu-latest]
23-
node: [18]
27+
node-version: [18, 20, 22]
2428

2529
steps:
2630
- name: Checkout
2731
uses: actions/checkout@v4
2832
with:
2933
persist-credentials: false
3034

31-
- name: Use Node.js ${{ matrix.node }}
35+
- name: Use Node.js ${{ matrix.node-version }}
3236
uses: actions/setup-node@v4
3337
with:
34-
node-version: ${{ matrix.node }}
38+
node-version: ${{ matrix.node-version }}
3539
registry-url: 'https://registry.npmjs.org'
3640

3741
- name: Build
@@ -50,25 +54,27 @@ jobs:
5054
NODE_OPTIONS: "--max_old_space_size=4096"
5155

5256
publish-next:
57+
name: Publish to npm (next) (${{ matrix.os }})
5358
needs: build
5459
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/timeline-chart'
5560

56-
runs-on: ubuntu-latest
61+
runs-on: ${{ matrix.os }}
5762

5863
strategy:
5964
matrix:
60-
node: [18]
65+
os: [ubuntu-latest]
66+
node-version: [20]
6167

6268
steps:
6369
- name: Checkout
6470
uses: actions/checkout@v4
6571
with:
6672
persist-credentials: false
6773

68-
- name: Use Node.js ${{ matrix.node }}
74+
- name: Use Node.js ${{ matrix.node-version}}
6975
uses: actions/setup-node@v4
7076
with:
71-
node-version: ${{ matrix.node }}
77+
node-version: ${{ matrix.node-version }}
7278
registry-url: 'https://registry.npmjs.org'
7379

7480
- name: Pre-Publish
@@ -91,21 +97,23 @@ jobs:
9197
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
9298

9399
publish-latest:
100+
name: Publish to npm (latest) (${{ matrix.os }})
94101
needs: build
95102
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'eclipse-cdt-cloud/timeline-chart'
96-
runs-on: ubuntu-latest
103+
runs-on: ${{ matrix.os }}
97104
strategy:
98105
matrix:
99-
node: [18]
106+
os: [ubuntu-latest]
107+
node-version: [20]
100108
steps:
101109
- name: Checkout
102110
uses: actions/checkout@v3
103111
with:
104112
persist-credentials: false
105-
- name: Use Node.js ${{ matrix.node }}
113+
- name: Use Node.js ${{ matrix.node-version }}
106114
uses: actions/setup-node@v3
107115
with:
108-
node-version: ${{ matrix.node }}
116+
node-version: ${{ matrix.node-version }}
109117
registry-url: 'https://registry.npmjs.org'
110118
- name: Pre-Publish
111119
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)