Skip to content

Commit 5a2ad89

Browse files
authored
centralize node version numbers for ci workflows (#5492)
1 parent 4d9b64f commit 5a2ad89

8 files changed

Lines changed: 30 additions & 17 deletions

File tree

.github/actions/node/action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Node.js
2+
description: Install the version of Node.js matching the input identifier
3+
inputs:
4+
version:
5+
description: "Version identifier of the version to use."
6+
required: false
7+
default: 'latest'
8+
runs:
9+
using: composite
10+
steps:
11+
- uses: actions/setup-node@v4
12+
with:
13+
node-version: ${{ inputs.version == 'eol' && '16' || inputs.version == 'oldest' && '18' || inputs.version == 'maintenance' && '20' || inputs.version == 'active' && '22' || inputs.version }}

.github/actions/node/active-lts/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ description: Install the current Active LTS version of Node.js
33
runs:
44
using: composite
55
steps:
6-
- uses: actions/setup-node@v4
6+
- uses: ./.github/actions/node
77
with:
8-
node-version: '22'
8+
version: active

.github/actions/node/latest/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ description: Install the latest version of Node.js
33
runs:
44
using: composite
55
steps:
6-
- uses: actions/setup-node@v4
6+
- uses: ./.github/actions/node
77
with:
8-
node-version: 'latest'
8+
version: latest

.github/actions/node/newest-maintenance-lts/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ description: Install the newest Maintenance LTS version of Node.js
33
runs:
44
using: composite
55
steps:
6-
- uses: actions/setup-node@v4
6+
- uses: ./.github/actions/node
77
with:
8-
node-version: '20'
8+
version: maintenance

.github/actions/node/oldest-maintenance-lts/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ description: Install the oldest Maintenance LTS version of Node.js
33
runs:
44
using: composite
55
steps:
6-
- uses: actions/setup-node@v4
6+
- uses: ./.github/actions/node
77
with:
8-
node-version: '18'
8+
version: oldest

.github/workflows/debugger.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
ubuntu:
1818
strategy:
1919
matrix:
20-
version: [18, 20, 22, latest]
20+
version: [oldest, maintenance, active, latest]
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
- uses: ./.github/actions/testagent/start
25-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
25+
- uses: ./.github/actions/node
2626
with:
27-
node-version: ${{ matrix.version }}
27+
version: ${{ matrix.version }}
2828
- uses: ./.github/actions/install
2929
- run: yarn test:debugger:ci
3030
- run: yarn test:integration:debugger

.github/workflows/llmobs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
sdk:
1818
strategy:
1919
matrix:
20-
version: [18, 20, 22, latest]
20+
version: [oldest, maintenance, active, latest]
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
- uses: ./.github/actions/testagent/start
25-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
25+
- uses: ./.github/actions/node
2626
with:
27-
node-version: ${{ matrix.version }}
27+
version: ${{ matrix.version }}
2828
- uses: ./.github/actions/install
2929
- run: yarn test:llmobs:sdk:ci
3030
- if: always()

.github/workflows/project.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
# setting fail-fast to false in an attempt to prevent this from happening
2121
fail-fast: false
2222
matrix:
23-
version: [18, 20, 22, latest]
23+
version: [oldest, maintenance, active, latest]
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
27+
- uses: ./.github/actions/node
2828
with:
29-
node-version: ${{ matrix.version }}
29+
version: ${{ matrix.version }}
3030
# Disable core dumps since some integration tests intentionally abort and core dump generation takes around 5-10s
3131
- uses: ./.github/actions/install
3232
- run: sudo sysctl -w kernel.core_pattern='|/bin/false'

0 commit comments

Comments
 (0)