Skip to content

Commit 29485d9

Browse files
BridgeARwatson
andauthored
Always check for the latest Node.js version being installed (#5504)
Make sure all actions use the one node installer action This aligns the behavior, allows to update the action easier and it makes sure we always use consistent versions. Co-authored-by: Thomas Watson <[email protected]>
1 parent a182723 commit 29485d9

10 files changed

+43
-49
lines changed

Diff for: .github/actions/node/action.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ inputs:
88
runs:
99
using: composite
1010
steps:
11-
- uses: actions/setup-node@v4
11+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
1212
with:
1313
node-version: ${{ inputs.version == 'eol' && '16' || inputs.version == 'oldest' && '18' || inputs.version == 'maintenance' && '20' || inputs.version == 'active' && '22' || inputs.version }}
14+
check-latest: true
15+
registry-url: ${{ inputs.registry-url || 'https://registry.npmjs.org' }}

Diff for: .github/workflows/appsec.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ jobs:
203203
fail-fast: false
204204
matrix:
205205
version:
206-
- 18
206+
- oldest
207207
- latest
208208
range: ['>=10.2.0 <11', '>=11.0.0 <13', '11.1.4', '>=13.0.0 <14', '13.2.0', '>=14.0.0 <=14.2.6', '>=14.2.7 <15', '>=15.0.0']
209209
include:
@@ -230,9 +230,9 @@ jobs:
230230
steps:
231231
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
232232
- uses: ./.github/actions/testagent/start
233-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
233+
- uses: ./.github/actions/node
234234
with:
235-
node-version: ${{ matrix.version }}
235+
version: ${{ matrix.version }}
236236
- uses: ./.github/actions/install
237237
- run: yarn test:appsec:plugins:ci
238238
- if: always()

Diff for: .github/workflows/plugins.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
aerospike:
2121
strategy:
2222
matrix:
23-
node-version: [16]
23+
node-version: [eol]
2424
range: ['>=4.0.0 <5.2.0']
2525
aerospike-image: [ce-5.7.0.15]
2626
test-image: [ubuntu-22.04]
@@ -58,9 +58,9 @@ jobs:
5858
steps:
5959
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6060
- uses: ./.github/actions/testagent/start
61-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
61+
- uses: ./.github/actions/node
6262
with:
63-
node-version: ${{ matrix.node-version }}
63+
version: ${{ matrix.node-version }}
6464
- run: yarn config set ignore-engines true
6565
- name: Install dependencies
6666
uses: ./.github/actions/install
@@ -124,7 +124,7 @@ jobs:
124124
aws-sdk:
125125
strategy:
126126
matrix:
127-
node-version: ['18', 'latest']
127+
node-version: [oldest, 'latest']
128128
runs-on: ubuntu-latest
129129
services:
130130
localstack:
@@ -163,9 +163,9 @@ jobs:
163163
steps:
164164
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
165165
- uses: ./.github/actions/testagent/start
166-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
166+
- uses: ./.github/actions/node
167167
with:
168-
node-version: ${{ matrix.node-version }}
168+
version: ${{ matrix.node-version }}
169169
- uses: ./.github/actions/install
170170
- run: yarn test:plugins:ci
171171
- if: always()
@@ -256,7 +256,7 @@ jobs:
256256
couchbase:
257257
strategy:
258258
matrix:
259-
node-version: [16]
259+
node-version: [eol]
260260
range: ['^2.6.12', '^3.0.7', '>=4.0.0 <4.2.0']
261261
include:
262262
- node-version: 18
@@ -276,9 +276,9 @@ jobs:
276276
steps:
277277
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
278278
- uses: ./.github/actions/testagent/start
279-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
279+
- uses: ./.github/actions/node
280280
with:
281-
node-version: ${{ matrix.node-version }}
281+
version: ${{ matrix.node-version }}
282282
- uses: ./.github/actions/install
283283
- run: yarn config set ignore-engines true
284284
- run: yarn test:plugins:ci --ignore-engines
@@ -475,16 +475,16 @@ jobs:
475475
http:
476476
strategy:
477477
matrix:
478-
node-version: ['18', '20', 'latest']
478+
node-version: [oldest, maintenance, 'latest']
479479
runs-on: ubuntu-latest
480480
env:
481481
PLUGINS: http
482482
steps:
483483
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
484484
- uses: ./.github/actions/testagent/start
485-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
485+
- uses: ./.github/actions/node
486486
with:
487-
node-version: ${{ matrix.node-version }}
487+
version: ${{ matrix.node-version }}
488488
- uses: ./.github/actions/install
489489
- run: yarn test:plugins:ci
490490
- if: always()
@@ -875,9 +875,9 @@ jobs:
875875
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
876876
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
877877
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
878-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
878+
- uses: ./.github/actions/node
879879
with:
880-
node-version: '16'
880+
version: eol
881881
- uses: ./.github/actions/install
882882
- run: yarn config set ignore-engines true
883883
- run: yarn services --ignore-engines

Diff for: .github/workflows/project.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
integration-guardrails:
3737
strategy:
3838
matrix:
39-
version: [14.0.0, 14, 16.0.0, 16, 18.0.0, 18.1.0, 20.0.0, 22.0.0]
39+
version: [14.0.0, 14, 16.0.0, eol, 18.0.0, 18.1.0, 20.0.0, 22.0.0]
4040
runs-on: ubuntu-latest
4141
steps:
4242
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
43+
- uses: ./.github/actions/node
4444
with:
45-
node-version: ${{ matrix.version }}
45+
version: ${{ matrix.version }}
4646
- uses: ./.github/actions/install
4747
- run: node node_modules/.bin/mocha --colors --timeout 30000 integration-tests/init.spec.js
4848

@@ -53,9 +53,9 @@ jobs:
5353
runs-on: ubuntu-latest
5454
steps:
5555
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
56-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
56+
- uses: ./.github/actions/node
5757
with:
58-
node-version: ${{ matrix.version }}
58+
version: ${{ matrix.version }}
5959
- run: node ./init
6060
- run: node ./init
6161
env:
@@ -64,17 +64,17 @@ jobs:
6464
integration-playwright:
6565
strategy:
6666
matrix:
67-
version: [18, latest]
67+
version: [oldest, latest]
6868
runs-on: ubuntu-latest
6969
env:
7070
DD_SERVICE: dd-trace-js-integration-tests
7171
DD_CIVISIBILITY_AGENTLESS_ENABLED: 1
7272
DD_API_KEY: ${{ secrets.DD_API_KEY_CI_APP }}
7373
steps:
7474
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
75-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
75+
- uses: ./.github/actions/node
7676
with:
77-
node-version: ${{ matrix.version }}
77+
version: ${{ matrix.version }}
7878
- uses: ./.github/actions/install
7979
# Install system dependencies for playwright
8080
- run: npx playwright install-deps
@@ -85,7 +85,7 @@ jobs:
8585
integration-ci:
8686
strategy:
8787
matrix:
88-
version: [18, latest]
88+
version: [oldest, latest]
8989
framework: [cucumber, selenium, jest, mocha]
9090
runs-on: ubuntu-latest
9191
env:
@@ -94,9 +94,9 @@ jobs:
9494
DD_API_KEY: ${{ secrets.DD_API_KEY_CI_APP }}
9595
steps:
9696
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
97-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
97+
- uses: ./.github/actions/node
9898
with:
99-
node-version: ${{ matrix.version }}
99+
version: ${{ matrix.version }}
100100
- name: Install Google Chrome
101101
run: |
102102
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@@ -127,7 +127,7 @@ jobs:
127127
# Important: This is outside the minimum supported version of dd-trace-js
128128
# Node > 16 does not work with [email protected] (not even without our plugin)
129129
# TODO: figure out what to do with this: we might have to deprecate support for [email protected]
130-
version: [16, latest]
130+
version: [eol, latest]
131131
# 6.7.0 is the minimum version we support
132132
cypress-version: [6.7.0, latest]
133133
module-type: ['commonJS', 'esm']
@@ -138,9 +138,9 @@ jobs:
138138
DD_API_KEY: ${{ secrets.DD_API_KEY_CI_APP }}
139139
steps:
140140
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
141-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
141+
- uses: ./.github/actions/node
142142
with:
143-
node-version: ${{ matrix.version }}
143+
version: ${{ matrix.version }}
144144
- uses: ./.github/actions/install
145145
- run: yarn config set ignore-engines true
146146
- run: yarn test:integration:cypress --ignore-engines

Diff for: .github/workflows/release-3.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ jobs:
2020
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2121
steps:
2222
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
24-
with:
25-
registry-url: 'https://registry.npmjs.org'
23+
- uses: ./.github/actions/node
2624
- run: npm publish --tag latest-node14 --provenance
2725
- id: pkg
2826
run: |

Diff for: .github/workflows/release-4.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ jobs:
2222
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2323
steps:
2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
26-
with:
27-
registry-url: 'https://registry.npmjs.org'
25+
- uses: ./.github/actions/node
2826
- run: npm publish --tag latest-node16 --provenance
2927
- id: pkg
3028
run: |

Diff for: .github/workflows/release-dev.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ jobs:
1313
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
17-
with:
18-
registry-url: 'https://registry.npmjs.org'
16+
- uses: ./.github/actions/node
1917
- uses: ./.github/actions/install
2018
- id: pkg
2119
run: |

Diff for: .github/workflows/release-latest.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ jobs:
2424
pkgjson: ${{ steps.pkg.outputs.json }}
2525
steps:
2626
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
28-
with:
29-
registry-url: 'https://registry.npmjs.org'
27+
- uses: ./.github/actions/node
3028
- run: npm publish --provenance
3129
- id: pkg
3230
run: |
@@ -45,7 +43,7 @@ jobs:
4543
needs: ['publish']
4644
steps:
4745
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
48-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
46+
- uses: ./.github/actions/node
4947
- id: pkg
5048
run: |
5149
content=`cat ./package.json | tr '\n' ' '`

Diff for: .github/workflows/release-proposal.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1212
with:
1313
fetch-depth: 0
14-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
14+
- uses: ./.github/actions/node
1515
- run: npm i -g @bengl/branch-diff
1616
- run: |
1717
mkdir -p ~/.config/changelog-maker

Diff for: .github/workflows/serverless-integration-test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
id-token: 'write'
1818
strategy:
1919
matrix:
20-
version: [18, latest]
20+
version: [oldest, latest]
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24-
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
24+
- uses: ./.github/actions/node
2525
with:
26-
node-version: ${{ matrix.version }}
26+
version: ${{ matrix.version }}
2727
- uses: ./.github/actions/install
2828
- name: Authenticate to Google Cloud
2929
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7

0 commit comments

Comments
 (0)