From 6e439b0d693fb95fa367bf50b5cf28cbe595d4ac Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Mon, 27 Jan 2025 16:40:55 +0100 Subject: [PATCH 1/3] ci: increase number of shards when running Next.js repo e2e tests --- .github/workflows/test-e2e.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 0a6ff91dac..e6a80c4dea 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -56,16 +56,16 @@ jobs: run: | if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then VERSION_SELECTORS=[${{ github.event.inputs.versions }}] - echo "group=[1, 2, 3, 4]" >> $GITHUB_OUTPUT - echo "total=4" >> $GITHUB_OUTPUT + echo "group=[1, 2, 3, 4, 5, 6]" >> $GITHUB_OUTPUT + echo "total=6" >> $GITHUB_OUTPUT elif [ "${{ github.event_name }}" == "pull_request" ]; then VERSION_SELECTORS=[\"latest\"] - echo "group=[1, 2, 3, 4]" >> $GITHUB_OUTPUT - echo "total=4" >> $GITHUB_OUTPUT + echo "group=[1, 2, 3, 4, 5, 6]" >> $GITHUB_OUTPUT + echo "total=6" >> $GITHUB_OUTPUT else - VERSION_SELECTORS=[\"latest\",\"canary\",\"14.2.15\",\"13.5.1\"] - echo "group=[1, 2, 3, 4]" >> $GITHUB_OUTPUT - echo "total=4" >> $GITHUB_OUTPUT + VERSION_SELECTORS=[\"latest\"] + echo "group=[1, 2, 3, 4, 5, 6]" >> $GITHUB_OUTPUT + echo "total=6" >> $GITHUB_OUTPUT fi VERSION_SPEC="[" From 0758f2951f3f57d8828865fcb6419d67622e1f25 Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Mon, 27 Jan 2025 20:28:29 +0100 Subject: [PATCH 2/3] test: set NEXT_PRIVATE_TEST_MODE when running Next.js repo tests --- tests/netlify-deploy.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/netlify-deploy.ts b/tests/netlify-deploy.ts index 13664acebe..25835dfd0e 100644 --- a/tests/netlify-deploy.ts +++ b/tests/netlify-deploy.ts @@ -90,6 +90,10 @@ export class NextDeployInstance extends NextInstance { command = "npm run build" publish = ".next" + [build.environment] + # this allows to use "CanaryOnly" features with next@latest + NEXT_PRIVATE_TEST_MODE = "e2e" + [[plugins]] package = "${runtimePackageName}" ` From 95e3610f810ec3814021b365533a1d46af93ed28 Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Tue, 28 Jan 2025 14:11:56 +0100 Subject: [PATCH 3/3] test: re-enable running tests against canary for upcoming changes visibility --- .github/workflows/test-e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index e6a80c4dea..29fb5c3ab7 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -63,7 +63,7 @@ jobs: echo "group=[1, 2, 3, 4, 5, 6]" >> $GITHUB_OUTPUT echo "total=6" >> $GITHUB_OUTPUT else - VERSION_SELECTORS=[\"latest\"] + VERSION_SELECTORS=[\"latest\",\"canary\"] echo "group=[1, 2, 3, 4, 5, 6]" >> $GITHUB_OUTPUT echo "total=6" >> $GITHUB_OUTPUT fi