diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f2557cc1..21a438e1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -14,7 +14,7 @@ jobs: lfs: true - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - run: corepack enable - uses: actions/cache@v3 @@ -67,7 +67,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - run: corepack enable - uses: actions/cache@v3 @@ -104,17 +104,14 @@ jobs: action: launch github-token: ${{ steps.github-token.outputs.token }} matrix: | - 16-alpine3.15 - 16-amazonlinux2 + 16-amazonlinux2023 16-debian10 16-ubi8 - 16-ubuntu18.04 - 18-alpine + 16-ubuntu20.04 18-amazonlinux 18-debian 18-ubi 18-ubuntu - 20-alpine 20-amazonlinux 20-debian 20-ubi @@ -136,11 +133,11 @@ jobs: strategy: matrix: image: - - 16-alpine3.15 - - 16-amazonlinux2 + - 16-alpine3.16 + - 16-amazonlinux2023 - 16-debian10 - 16-ubi8 - - 16-ubuntu18.04 + - 16-ubuntu20.04 - 18-alpine - 18-amazonlinux - 18-debian @@ -154,6 +151,14 @@ jobs: arch: - x64 - arm64 + # https://github.com/actions/runner/issues/801 + exclude: + - image: 16-alpine3.16 + arch: arm64 + - image: 18-alpine + arch: arm64 + - image: 20-alpine + arch: arm64 fail-fast: false container: image: ghcr.io/${{ github.repository }}/dev:${{ matrix.image }} @@ -164,9 +169,6 @@ jobs: YARN_IGNORE_NODE: 1 steps: - - if: matrix.arch == 'arm64' && contains(matrix.image, 'alpine') - run: sed -i "s/ID=alpine/ID=armpine/" /etc/os-release - - uses: actions/checkout@v4 with: lfs: true diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index f603bd96..503870ae 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -13,11 +13,11 @@ jobs: strategy: matrix: image: - - 16-alpine3.15 - - 16-amazonlinux2 + - 16-alpine3.16 + - 16-amazonlinux2023 - 16-debian10 - 16-ubi8 - - 16-ubuntu18.04 + - 16-ubuntu20.04 - 18-alpine - 18-amazonlinux - 18-debian diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7ce7971..880d47d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: lfs: true - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - run: corepack enable - run: yarn install --immutable diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 424b7e0c..4b714107 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -18,7 +18,7 @@ jobs: lfs: true - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20 - run: corepack enable - uses: actions/cache@v3 diff --git a/.yarn/versions/1ce1ee8c.yml b/.yarn/versions/1ce1ee8c.yml new file mode 100644 index 00000000..8ff1cd1b --- /dev/null +++ b/.yarn/versions/1ce1ee8c.yml @@ -0,0 +1,9 @@ +releases: + "@solarwinds-apm/test": minor + +declined: + - "@solarwinds-apm/bindings" + - "@solarwinds-apm/compat" + - "@solarwinds-apm/dependencies" + - "@solarwinds-apm/sdk" + - solarwinds-apm diff --git a/docker/16-alpine3.15.Dockerfile b/docker/16-alpine3.16.Dockerfile similarity index 88% rename from docker/16-alpine3.15.Dockerfile rename to docker/16-alpine3.16.Dockerfile index 3541b0d5..64e3464c 100644 --- a/docker/16-alpine3.15.Dockerfile +++ b/docker/16-alpine3.16.Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine3.15 +FROM node:16-alpine3.16 RUN apk add --no-cache \ curl \ diff --git a/docker/16-amazonlinux2.Dockerfile b/docker/16-amazonlinux2.Dockerfile deleted file mode 100644 index a677d881..00000000 --- a/docker/16-amazonlinux2.Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM amazonlinux:2 - -RUN amazon-linux-extras install -y epel && \ - yum install -y \ - curl \ - git \ - git-lfs \ - tar \ - xz - -RUN yum install -y https://rpm.nodesource.com/pub_16.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm && \ - yum install -y nodejs && \ - yum clean all - -RUN corepack enable - -WORKDIR /solarwinds-apm -ENTRYPOINT ["/bin/bash", "-c"] diff --git a/docker/16-amazonlinux2023.Dockerfile b/docker/16-amazonlinux2023.Dockerfile new file mode 100644 index 00000000..0cf7e2ca --- /dev/null +++ b/docker/16-amazonlinux2023.Dockerfile @@ -0,0 +1,17 @@ +FROM amazonlinux:2023 + +RUN dnf install -y \ + curl-minimal \ + git \ + git-lfs \ + tar \ + xz + +RUN dnf install -y https://rpm.nodesource.com/pub_16.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm && \ + dnf install -y nodejs && \ + dnf clean -y all + +RUN corepack enable + +WORKDIR /solarwinds-apm +ENTRYPOINT ["/bin/bash", "-c"] diff --git a/docker/16-ubuntu18.04.Dockerfile b/docker/16-ubuntu20.04.Dockerfile similarity index 76% rename from docker/16-ubuntu18.04.Dockerfile rename to docker/16-ubuntu20.04.Dockerfile index 1eefd030..23ac1f7e 100644 --- a/docker/16-ubuntu18.04.Dockerfile +++ b/docker/16-ubuntu20.04.Dockerfile @@ -1,9 +1,6 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 -RUN apt-get update && apt-get install -y software-properties-common - -RUN add-apt-repository ppa:git-core/ppa && \ - apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y \ ca-certificates \ curl \ git \ diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index b57cdd4d..59b3cfc2 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -3,7 +3,7 @@ services: 16-alpine: build: context: . - dockerfile: 16-alpine3.15.Dockerfile + dockerfile: 16-alpine3.16.Dockerfile environment: YARN_IGNORE_NODE: 1 volumes: @@ -14,7 +14,7 @@ services: 16-amazonlinux: build: context: . - dockerfile: 16-amazonlinux2.Dockerfile + dockerfile: 16-amazonlinux2023.Dockerfile environment: YARN_IGNORE_NODE: 1 volumes: @@ -47,7 +47,7 @@ services: 16-ubuntu: build: context: . - dockerfile: 16-ubuntu18.04.Dockerfile + dockerfile: 16-ubuntu20.04.Dockerfile environment: YARN_IGNORE_NODE: 1 volumes: @@ -151,7 +151,7 @@ services: example: build: context: . - dockerfile: 18-ubuntu.Dockerfile + dockerfile: 20-ubuntu.Dockerfile volumes: - ..:/solarwinds-apm links: diff --git a/packages/test/src/bin.ts b/packages/test/src/bin.ts index 193f5eb1..9cf66f35 100644 --- a/packages/test/src/bin.ts +++ b/packages/test/src/bin.ts @@ -38,8 +38,7 @@ const DEFAULTS = [ const resolve = createRequire(callsite().getFileName()!).resolve // TSX registers a custom loader that lets Node import TypeScript files -const tsxLoaderPath = pathToFileURL(resolve("tsx")).toString() -const tsxRequirePath = resolve("tsx/preflight") +const tsxPath = pathToFileURL(resolve("tsx")).toString() // Skip Node executable and current script path let argv = process.argv.slice(2) @@ -90,15 +89,16 @@ const reporter = semver.gte(process.versions.node, "18.0.0") ? ["--test-reporter", "spec"] : [] +const loader = semver.gte(process.versions.node, "20.8.0") + ? ["--import", tsxPath] + : ["--loader", tsxPath] + argv = [ // Launch Node in test runner mode "--test", ...reporter, // Register TSX loaders - "--require", - tsxRequirePath, - "--loader", - tsxLoaderPath, + ...loader, // Forward the rest of our parameters ...process.execArgv, ...argv,