From f70813fc2f4465ed5fc85f56ebbfe3efa3c39b1e Mon Sep 17 00:00:00 2001 From: Amarin Phaosawasdi Date: Thu, 28 Apr 2022 17:17:42 -0700 Subject: [PATCH 1/2] test: update node versions in tests --- .github/workflows/ci.yaml | 3 ++- system-test/Dockerfile.node15-alpine | 14 -------------- ....node10-alpine => Dockerfile.node17-alpine} | 2 +- system-test/system_test.sh | 18 +++++++++--------- tools/build/build.sh | 2 +- 5 files changed, 13 insertions(+), 26 deletions(-) delete mode 100644 system-test/Dockerfile.node15-alpine rename system-test/{Dockerfile.node10-alpine => Dockerfile.node17-alpine} (93%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e151f8e6..861dab64 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,8 +8,9 @@ jobs: test-linux: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - node: [ 10, 12, 14, 15, 16] + node: [ 12, 14, 16, 17, 18 ] steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/system-test/Dockerfile.node15-alpine b/system-test/Dockerfile.node15-alpine deleted file mode 100644 index b2fca4bd..00000000 --- a/system-test/Dockerfile.node15-alpine +++ /dev/null @@ -1,14 +0,0 @@ -FROM golang:1.17-alpine as builder -RUN apk add --no-cache git -WORKDIR /root/ -RUN go get github.com/google/pprof - - -FROM node:15-alpine - -ARG ADDITIONAL_PACKAGES - -RUN apk add --no-cache bash $ADDITIONAL_PACKAGES -WORKDIR /root/ -COPY --from=builder /go/bin/pprof /bin -RUN chmod a+x /bin/pprof diff --git a/system-test/Dockerfile.node10-alpine b/system-test/Dockerfile.node17-alpine similarity index 93% rename from system-test/Dockerfile.node10-alpine rename to system-test/Dockerfile.node17-alpine index da71c9a8..4808c6bd 100644 --- a/system-test/Dockerfile.node10-alpine +++ b/system-test/Dockerfile.node17-alpine @@ -4,7 +4,7 @@ WORKDIR /root/ RUN go get github.com/google/pprof -FROM node:10-alpine +FROM node:17-alpine ARG ADDITIONAL_PACKAGES diff --git a/system-test/system_test.sh b/system-test/system_test.sh index dedc6bf5..41b27535 100755 --- a/system-test/system_test.sh +++ b/system-test/system_test.sh @@ -10,11 +10,15 @@ set -eox pipefail cd $(dirname $0) +# The list of tested versions below should be in sync with node's +# official releases. https://nodejs.org/en/about/releases/ if [[ -z "$BINARY_HOST" ]]; then ADDITIONAL_PACKAGES="python3 g++ make" - NODE_VERSIONS=(10 12 14 15 16 node) + NODE_VERSIONS=(12 14 16 17 node) else - NODE_VERSIONS=(10 12 14 15 16) + # Tested versions for pre-built binaries are limited based on + # what node-pre-gyp can specify as its target version. + NODE_VERSIONS=(12 14 16) fi for i in ${NODE_VERSIONS[@]}; do @@ -26,13 +30,9 @@ for i in ${NODE_VERSIONS[@]}; do docker run -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" node$i-linux \ /src/system-test/test.sh - # Test support for accurate line numbers with node versions supporting this - # feature. - if [ "$i" != "10" ]; then - docker run -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" \ - -e VERIFY_TIME_LINE_NUMBERS="true" node$i-linux \ - /src/system-test/test.sh - fi + docker run -v $PWD/..:/src -e BINARY_HOST="$BINARY_HOST" \ + -e VERIFY_TIME_LINE_NUMBERS="true" node$i-linux \ + /src/system-test/test.sh # Test Alpine support for the given node version. retry docker build -f Dockerfile.node$i-alpine \ diff --git a/tools/build/build.sh b/tools/build/build.sh index d448f6b5..79715c57 100755 --- a/tools/build/build.sh +++ b/tools/build/build.sh @@ -28,7 +28,7 @@ mkdir -p "$ARTIFACTS_OUT" npm install --quiet -for version in 10.0.0 12.0.0 14.0.0 15.0.0 16.0.0 +for version in 12.0.0 14.0.0 16.0.0 do ./node_modules/.bin/node-pre-gyp configure rebuild package \ --target=$version --target_arch="x64" From b55b0ce862cd6099def336335c0cb691666f48cf Mon Sep 17 00:00:00 2001 From: Amarin Phaosawasdi Date: Fri, 29 Apr 2022 16:32:40 -0700 Subject: [PATCH 2/2] Address PR feedback --- package.json | 2 +- system-test/system_test.sh | 4 ++-- tools/build/build.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d010ffef..ed119d92 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "delay": "^5.0.0", "findit2": "^2.2.3", "nan": "^2.14.0", - "@mapbox/node-pre-gyp": "^1.0.0", + "@mapbox/node-pre-gyp": "^1.0.9", "p-limit": "^3.0.0", "pify": "^5.0.0", "protobufjs": "~6.11.0", diff --git a/system-test/system_test.sh b/system-test/system_test.sh index 41b27535..e95e3515 100755 --- a/system-test/system_test.sh +++ b/system-test/system_test.sh @@ -14,11 +14,11 @@ cd $(dirname $0) # official releases. https://nodejs.org/en/about/releases/ if [[ -z "$BINARY_HOST" ]]; then ADDITIONAL_PACKAGES="python3 g++ make" - NODE_VERSIONS=(12 14 16 17 node) + NODE_VERSIONS=(12 14 16 17 18 node) else # Tested versions for pre-built binaries are limited based on # what node-pre-gyp can specify as its target version. - NODE_VERSIONS=(12 14 16) + NODE_VERSIONS=(12 14 16 17) fi for i in ${NODE_VERSIONS[@]}; do diff --git a/tools/build/build.sh b/tools/build/build.sh index 79715c57..5f2df100 100755 --- a/tools/build/build.sh +++ b/tools/build/build.sh @@ -28,7 +28,7 @@ mkdir -p "$ARTIFACTS_OUT" npm install --quiet -for version in 12.0.0 14.0.0 16.0.0 +for version in 12.0.0 14.0.0 16.0.0 17.0.1 do ./node_modules/.bin/node-pre-gyp configure rebuild package \ --target=$version --target_arch="x64"