diff --git a/.github/workflows/test-on-pr.yml b/.github/workflows/test-on-pr.yml index 744f52c..f845eff 100644 --- a/.github/workflows/test-on-pr.yml +++ b/.github/workflows/test-on-pr.yml @@ -93,6 +93,11 @@ jobs: npm_version: "latest" yarn_version: "latest" pnpm_version: "latest" + # EOL compatibility - Node 16 (EOL sept 2023) + - node_version: "16" + npm_version: "8.0.0" + yarn_version: "1.22.22" + pnpm_version: "8.0.0" steps: - name: Checkout code diff --git a/test/e2e/.dockerignore b/test/e2e/.dockerignore new file mode 100644 index 0000000..210c47a --- /dev/null +++ b/test/e2e/.dockerignore @@ -0,0 +1,2 @@ +node_modules +Dockerfile diff --git a/test/e2e/Dockerfile b/test/e2e/Dockerfile index 290922d..938bf93 100644 --- a/test/e2e/Dockerfile +++ b/test/e2e/Dockerfile @@ -1,4 +1,4 @@ -FROM node:24-bookworm as builder +FROM node:24-bookworm AS builder ENV CI=true @@ -6,17 +6,20 @@ ENV CI=true WORKDIR /app # Copy package files first for better caching -COPY packages/safe-chain/package*.json ./ +COPY packages/safe-chain/package.json ./packages/safe-chain/package.json +COPY ./package.json ./package.json +COPY ./npm-shrinkwrap.json ./ # Install dependencies -RUN npm install +RUN npm ci # Copy the rest of the application -COPY packages/safe-chain ./ +COPY packages/safe-chain ./packages/safe-chain # Build the application -RUN npm --no-git-tag-version version 1.0.0 --allow-same-version -RUN npm pack +RUN npm --no-git-tag-version version 1.0.0 --allow-same-version --workspace=packages/safe-chain +RUN cp ./npm-shrinkwrap.json packages/safe-chain/ +RUN npm pack --workspace=packages/safe-chain FROM buildpack-deps:trixie diff --git a/test/e2e/setup.teardown.e2e.spec.js b/test/e2e/setup.teardown.e2e.spec.js index 0ddfaf4..a3fdce2 100644 --- a/test/e2e/setup.teardown.e2e.spec.js +++ b/test/e2e/setup.teardown.e2e.spec.js @@ -25,7 +25,8 @@ describe("E2E: safe-chain setup command", () => { it(`safe-chain setup wraps npm command after installation for ${shell}`, async () => { // setting up the container const installationShell = await container.openShell(shell); - await installationShell.runCommand("safe-chain setup"); + const out = await installationShell.runCommand("safe-chain setup"); + console.log(out.output); const projectShell = await container.openShell(shell); await projectShell.runCommand("cd /testapp");