diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9f2c1cb..ae0e74f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,6 +103,7 @@ jobs: - cloudflare-pages-router - pages-router-prod - cloudflare-workers + - cloudflare-dev steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-node-pnpm diff --git a/playwright.config.ts b/playwright.config.ts index 717556b2..08fa216b 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -68,6 +68,23 @@ const projectServers = { timeout: 60_000, }, }, + "cloudflare-dev": { + testDir: "./tests/e2e", + testMatch: [ + "**/cloudflare-dev/**/*.spec.ts", + "**/app-router/instrumentation.spec.ts", + ], + use: { baseURL: "http://localhost:4178" }, + server: { + // Run vite dev (not wrangler) against the cloudflare example so that + // configureServer() is exercised with @cloudflare/vite-plugin loaded. + command: "npx vite --port 4178", + cwd: "./examples/app-router-cloudflare", + port: 4178, + reuseExistingServer: !process.env.CI, + timeout: 30_000, + }, + }, }; type ProjectName = keyof typeof projectServers;