From 418720061a8ff668a0b6ac8966101ada57a4ef7e Mon Sep 17 00:00:00 2001 From: Maggie Nolan Date: Fri, 20 Nov 2020 09:48:31 -0800 Subject: [PATCH] chore: add support for Node 15 --- .github/workflows/ci.yaml | 2 +- system-test/Dockerfile.linux | 2 +- system-test/Dockerfile.node15-alpine | 14 ++++++++++++++ system-test/system_test.sh | 4 ++-- system-test/test.sh | 1 + tools/build/build.sh | 2 +- 6 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 system-test/Dockerfile.node15-alpine diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91ab3d6e..7aa9111a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ 10, 12, 14] + node: [ 10, 12, 14, 15] steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 diff --git a/system-test/Dockerfile.linux b/system-test/Dockerfile.linux index cf21f952..d93dc765 100644 --- a/system-test/Dockerfile.linux +++ b/system-test/Dockerfile.linux @@ -15,7 +15,7 @@ ARG VERIFY_TIME_LINE_NUMBERS RUN apt-get update && apt-get install -y curl $ADDITIONAL_PACKAGES \ && rm -rf /var/lib/apt/lists/* -ENV NVM_DIR /root/.nvm +ENV NVM_DIR /bin/.nvm RUN mkdir -p $NVM_DIR diff --git a/system-test/Dockerfile.node15-alpine b/system-test/Dockerfile.node15-alpine new file mode 100644 index 00000000..ca58520d --- /dev/null +++ b/system-test/Dockerfile.node15-alpine @@ -0,0 +1,14 @@ +FROM golang:1.15-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/system_test.sh b/system-test/system_test.sh index b2e330d6..93bb126f 100755 --- a/system-test/system_test.sh +++ b/system-test/system_test.sh @@ -18,7 +18,7 @@ if [[ "$RUN_ONLY_V8_CANARY_TEST" == "true" ]]; then NVM_NODEJS_ORG_MIRROR="https://nodejs.org/download/v8-canary" NODE_VERSIONS=(node) else - NODE_VERSIONS=(10 12 14) + NODE_VERSIONS=(10 12 14 15) fi for i in ${NODE_VERSIONS[@]}; do @@ -33,7 +33,7 @@ for i in ${NODE_VERSIONS[@]}; do # Test support for accurate line numbers with node versions supporting this # feature. - if [ "$i" != "10" ] && [ "$i" != "11" ]; then + 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 diff --git a/system-test/test.sh b/system-test/test.sh index 5a86d96d..c6e9edbc 100755 --- a/system-test/test.sh +++ b/system-test/test.sh @@ -1,5 +1,6 @@ #!/bin/bash +trap "cd $(dirname $0)/.. && npm run clean" EXIT trap "echo '** TEST FAILED **'" ERR . $(dirname $0)/../tools/retry.sh diff --git a/tools/build/build.sh b/tools/build/build.sh index da73fe4c..407866ca 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 +for version in 10.0.0 12.0.0 14.0.0 15.0.0 do ./node_modules/.bin/node-pre-gyp configure rebuild package \ --target=$version --target_arch="x64"