Repository: vercel/next.js
Pull request: Add separate E2E deploy env for turbopack tests

x-ref: [slack thread](https://vercel.slack.com/archives/C04KC8A53T7/p1770151130656569?thread_ts=1770107873.440639&cid=C04KC8A53T7)

Changed files:
filename: .github/workflows/build_reusable.yml
patch: @@ -113,6 +113,8 @@ env:
   VERCEL_TEST_TEAM: vtest314-next-e2e-tests
   VERCEL_ADAPTER_TEST_TOKEN: ${{ secrets.VERCEL_ADAPTER_TEST_TOKEN }}
   VERCEL_ADAPTER_TEST_TEAM: vtest314-next-adapter-e2e-tests
+  VERCEL_TURBOPACK_TEST_TOKEN: ${{ secrets.VERCEL_TURBOPACK_TEST_TOKEN }}
+  VERCEL_TURBOPACK_TEST_TEAM: vtest314-next-turbopack-e2e-tests
   NEXT_TEST_PREFER_OFFLINE: 1
   NEXT_CI_RUNNER: ${{ inputs.runs_on_labels }}
   NEXT_TEST_PROXY_ADDRESS: ${{ inputs.overrideProxyAddress || '' }}

filename: .github/workflows/test_e2e_deploy_release.yml
patch: @@ -35,6 +35,8 @@ env:
   VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
   VERCEL_ADAPTER_TEST_TEAM: vtest314-next-adapter-e2e-tests
   VERCEL_ADAPTER_TEST_TOKEN: ${{ secrets.VERCEL_ADAPTER_TEST_TOKEN }}
+  VERCEL_TURBOPACK_TEST_TEAM: vtest314-next-turbopack-e2e-tests
+  VERCEL_TURBOPACK_TEST_TOKEN: ${{ secrets.VERCEL_TURBOPACK_TEST_TOKEN }}
 
 run-name: test-e2e-deploy ${{ inputs.nextVersion || (github.event_name == 'release' && github.event.release.tag_name) || 'canary' }}
 

filename: scripts/reset-project.mjs
patch: @@ -7,6 +7,9 @@ export const TEST_TOKEN = process.env.VERCEL_TEST_TOKEN
 export const ADAPTER_TEST_TEAM_NAME = process.env.VERCEL_ADAPTER_TEST_TEAM
 export const ADAPTER_TEST_TOKEN = process.env.VERCEL_ADAPTER_TEST_TOKEN
 
+export const TURBOPACK_TEST_TEAM_NAME = process.env.VERCEL_TURBOPACK_TEST_TEAM
+export const TURBOPACK_TEST_TOKEN = process.env.VERCEL_TURBOPACK_TEST_TOKEN
+
 /**
  * Retry a fetch request with exponential backoff
  * @param {string} url - The URL to fetch

filename: scripts/run-e2e-test-project-reset.mjs
patch: @@ -4,31 +4,31 @@ import {
   TEST_TEAM_NAME,
   ADAPTER_TEST_TEAM_NAME,
   ADAPTER_TEST_TOKEN,
+  TURBOPACK_TEST_TEAM_NAME,
+  TURBOPACK_TEST_TOKEN,
   TEST_TOKEN,
 } from './reset-project.mjs'
 
 async function main() {
   let hadFailure = false
 
-  await resetProject({
-    projectName: TEST_PROJECT_NAME,
-    teamId: TEST_TEAM_NAME,
-    token: TEST_TOKEN,
-    disableDeploymentProtection: true,
-  }).catch((err) => {
-    console.error(err)
-    hadFailure = true
-  })
-
-  await resetProject({
-    projectName: TEST_PROJECT_NAME,
-    teamId: ADAPTER_TEST_TEAM_NAME,
-    token: ADAPTER_TEST_TOKEN,
-    disableDeploymentProtection: true,
-  }).catch((err) => {
-    console.error(err)
-    hadFailure = true
-  })
+  for (const { teamId, token } of [
+    { teamId: TEST_TEAM_NAME, token: TEST_TOKEN },
+    { teamId: ADAPTER_TEST_TEAM_NAME, token: ADAPTER_TEST_TOKEN },
+    { teamId: TURBOPACK_TEST_TEAM_NAME, token: TURBOPACK_TEST_TOKEN },
+  ]) {
+    try {
+      await resetProject({
+        projectName: TEST_PROJECT_NAME,
+        teamId,
+        token,
+        disableDeploymentProtection: true,
+      })
+    } catch (err) {
+      console.error(err)
+      hadFailure = true
+    }
+  }
 
   if (hadFailure) {
     throw new Error(`resetting a project failed`)

filename: test/lib/next-modes/next-deploy.ts
patch: @@ -220,14 +220,19 @@ export class NextDeployInstance extends NextInstance {
 
     const vercelFlags: string[] = []
     const NEXT_ENABLE_ADAPTER = process.env.NEXT_ENABLE_ADAPTER
+    const IS_TURBOPACK_TEST = process.env.IS_TURBOPACK_TEST
 
     const TEST_TEAM_NAME = NEXT_ENABLE_ADAPTER
       ? projectEnv.ADAPTER_TEST_TEAM_NAME
-      : projectEnv.TEST_TEAM_NAME
+      : IS_TURBOPACK_TEST
+        ? projectEnv.TURBOPACK_TEST_TEAM_NAME
+        : projectEnv.TEST_TEAM_NAME
 
     const TEST_TOKEN = NEXT_ENABLE_ADAPTER
       ? projectEnv.ADAPTER_TEST_TOKEN
-      : projectEnv.TEST_TOKEN
+      : IS_TURBOPACK_TEST
+        ? projectEnv.TURBOPACK_TEST_TOKEN
+        : projectEnv.TEST_TOKEN
 
     // If the team name is available in the environment, use it as the scope.
     if (TEST_TEAM_NAME) {