Skip to content

Commit 36b4c8f

Browse files
nbbeekenbaileympearson
authored andcommitted
ci(NODE-5271): add node 20 (#577)
1 parent 2ff2830 commit 36b4c8f

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

.evergreen/config.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ tasks:
118118
commands:
119119
- func: fetch source
120120
vars:
121-
NODE_LTS_NAME: fermium
121+
NODE_LTS_VERSION: 14
122122
- func: install dependencies
123123
- func: run tests
124124
vars:
@@ -128,7 +128,7 @@ tasks:
128128
commands:
129129
- func: fetch source
130130
vars:
131-
NODE_LTS_NAME: gallium
131+
NODE_LTS_VERSION: 16
132132
- func: install dependencies
133133
- func: run tests
134134
vars:
@@ -138,17 +138,25 @@ tasks:
138138
commands:
139139
- func: fetch source
140140
vars:
141-
NODE_LTS_NAME: hydrogen
141+
NODE_LTS_VERSION: 18
142142
- func: install dependencies
143143
- func: run tests
144144
vars:
145145
TEST_TARGET: node
146+
- name: node-tests-v20
147+
tags: ["node"]
148+
commands:
149+
- func: fetch source
150+
vars:
151+
NODE_LTS_VERSION: 20
152+
- func: install dependencies
153+
- func: run tests
146154
- name: node-tests-latest
147155
tags: ["node"]
148156
commands:
149157
- func: fetch source
150158
vars:
151-
NODE_LTS_NAME: latest
159+
NODE_LTS_VERSION: latest
152160
- func: install dependencies
153161
- func: run tests
154162
vars:
@@ -158,26 +166,25 @@ tasks:
158166
commands:
159167
- func: fetch source
160168
vars:
161-
NODE_MAJOR_VERSION: 16
169+
NODE_LTS_VERSION: 20
162170
- func: install dependencies
163171
- func: run tests
164172
vars:
165-
TEST_TARGET: browser
166-
NODE_LTS_NAME: hydrogen
173+
TEST_TARGET: web
167174
- name: run-checks
168175
tags:
169176
- run-checks
170177
commands:
171178
- func: fetch source
172179
vars:
173-
NODE_LTS_NAME: hydrogen
180+
NODE_LTS_VERSION: 20
174181
- func: install dependencies
175182
- func: run checks
176183
- name: check-typescript-oldest
177184
commands:
178185
- func: fetch source
179186
vars:
180-
NODE_LTS_NAME: hydrogen
187+
NODE_LTS_VERSION: 20
181188
- func: install dependencies
182189
- func: "run typescript"
183190
vars:
@@ -187,7 +194,7 @@ tasks:
187194
commands:
188195
- func: fetch source
189196
vars:
190-
NODE_LTS_NAME: hydrogen
197+
NODE_LTS_VERSION: 20
191198
- func: install dependencies
192199
- func: "run typescript"
193200
vars:
@@ -197,7 +204,7 @@ tasks:
197204
commands:
198205
- func: fetch source
199206
vars:
200-
NODE_LTS_NAME: hydrogen
207+
NODE_LTS_VERSION: 20
201208
- func: install dependencies
202209
- func: "run typescript"
203210
vars:

.evergreen/install-dependencies.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -o errexit # Exit the script with error if any of the commands fail
33

4-
NODE_LTS_NAME=${NODE_LTS_NAME:-fermium}
4+
NODE_LTS_VERSION=${NODE_LTS_VERSION:-14}
55
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY:-$(pwd)}/node-artifacts"
66
if [[ "$OS" = "Windows_NT" ]]; then NODE_ARTIFACTS_PATH=$(cygpath --unix "$NODE_ARTIFACTS_PATH"); fi
77

@@ -28,11 +28,12 @@ curl "${CURL_FLAGS[@]}" "https://nodejs.org/dist/index.tab" --output node_index.
2828

2929
while IFS=$'\t' read -r -a row; do
3030
node_index_version="${row[0]}"
31+
node_index_major_version=$(echo $node_index_version | sed -E 's/^v([0-9]+).*$/\1/')
3132
node_index_date="${row[1]}"
3233
node_index_lts="${row[9]}"
3334
[[ "$node_index_version" = "version" ]] && continue # skip tsv header
34-
[[ "$NODE_LTS_NAME" = "latest" ]] && break # first line is latest
35-
[[ "$NODE_LTS_NAME" = "$node_index_lts" ]] && break # case insensitive compare
35+
[[ "$NODE_LTS_VERSION" = "latest" ]] && break # first line is latest
36+
[[ "$NODE_LTS_VERSION" = "$node_index_major_version" ]] && break # case insensitive compare
3637
done < node_index.tab
3738

3839
if [[ "$OS" = "Windows_NT" ]]; then

.evergreen/setup-environment.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/env bash
22

3-
if [ -z "$NODE_LTS_NAME" ]; then
4-
echo "NODE_LTS_NAME environment variable must be specified"
3+
if [ -z "$NODE_LTS_VERSION" ]; then
4+
echo "NODE_LTS_VERSION environment variable must be specified"
55
exit 1
66
fi
77

@@ -16,12 +16,12 @@ export PROJECT_DIRECTORY="$(pwd)"
1616
cat <<EOT > expansion.yml
1717
CURRENT_VERSION: "$CURRENT_VERSION"
1818
PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
19-
NODE_LTS_NAME: "$NODE_LTS_NAME"
19+
NODE_LTS_VERSION: "$NODE_LTS_VERSION"
2020
PREPARE_SHELL: |
2121
set -o errexit
2222
set -o xtrace
2323
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
24-
export NODE_LTS_NAME="$NODE_LTS_NAME"
24+
export NODE_LTS_VERSION="$NODE_LTS_VERSION"
2525
EOT
2626
# See what we've done
2727
cat expansion.yml

0 commit comments

Comments
 (0)