Skip to content

ci(NODE-5271): add node 20 #577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: fermium
NODE_LTS_VERSION: 14
- func: install dependencies
- func: run tests
vars:
Expand All @@ -110,7 +110,7 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: gallium
NODE_LTS_VERSION: 16
- func: install dependencies
- func: run tests
vars:
Expand All @@ -120,17 +120,25 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 18
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: node
- name: node-tests-v20
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_LTS_VERSION: 20
- func: install dependencies
- func: run tests
- name: node-tests-latest
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_LTS_NAME: latest
NODE_LTS_VERSION: latest
- func: install dependencies
- func: run tests
vars:
Expand All @@ -140,7 +148,7 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 20
- func: install dependencies
- func: run tests
vars:
Expand All @@ -149,15 +157,15 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 20
- func: install dependencies
- func: run bundling
- name: no-bigint-web-tests
tags: ["no-bigint", "web"]
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 20
- func: install dependencies
- func: run tests
vars:
Expand All @@ -169,14 +177,14 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 20
- func: install dependencies
- func: run checks
- name: check-typescript-oldest
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 20
- func: install dependencies
- func: "run typescript"
vars:
Expand All @@ -186,7 +194,7 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 20
- func: install dependencies
- func: "run typescript"
vars:
Expand All @@ -196,7 +204,7 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 20
- func: install dependencies
- func: "run typescript"
vars:
Expand All @@ -206,7 +214,7 @@ tasks:
commands:
- func: fetch source
vars:
NODE_LTS_NAME: hydrogen
NODE_LTS_VERSION: 20
- func: install dependencies
- func: run eslint plugin tests

Expand Down
7 changes: 4 additions & 3 deletions .evergreen/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -o errexit # Exit the script with error if any of the commands fail

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

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

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

if [[ "$OS" = "Windows_NT" ]]; then
Expand Down
8 changes: 4 additions & 4 deletions .evergreen/setup-environment.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/env bash

if [ -z "$NODE_LTS_NAME" ]; then
echo "NODE_LTS_NAME environment variable must be specified"
if [ -z "$NODE_LTS_VERSION" ]; then
echo "NODE_LTS_VERSION environment variable must be specified"
exit 1
fi

Expand All @@ -16,12 +16,12 @@ export PROJECT_DIRECTORY="$(pwd)"
cat <<EOT > expansion.yml
CURRENT_VERSION: "$CURRENT_VERSION"
PROJECT_DIRECTORY: "$PROJECT_DIRECTORY"
NODE_LTS_NAME: "$NODE_LTS_NAME"
NODE_LTS_VERSION: "$NODE_LTS_VERSION"
PREPARE_SHELL: |
set -o errexit
set -o xtrace
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
export NODE_LTS_NAME="$NODE_LTS_NAME"
export NODE_LTS_VERSION="$NODE_LTS_VERSION"
EOT
# See what we've done
cat expansion.yml