Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix(ci): align e2e port to 3000 to match local dev

Gener4394351f8b55
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 443191fdd..e6484d8ad 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -45,6 +45,9 @@ jobs:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 15
+ env:
+ BETTER_AUTH_SECRET: ci-e2e-secret
+ BETTER_AUTH_URL: http://localhost:3000
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
@@ -54,22 +57,12 @@ jobs:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- - name: Apply D1 migration
- run: pnpm run db:migrate
+ - run: pnpm run db:migrate
- name: Start dev server
run: |
- BETTER_AUTH_SECRET=ci-e2e-secret BETTER_AUTH_URL=http://localhost:8787 \
- pnpm --filter @alook/web exec next dev --port 8787 &
- for i in $(seq 1 30); do
- if curl -sf http://localhost:8787/api/health > /dev/null 2>&1; then
- echo "Server ready"
- break
- fi
- echo "Waiting for server... ($i)"
- sleep 2
- done
- - name: Run e2e tests
- run: pnpm test:e2e
+ pnpm --filter @alook/web dev &
+ until curl -sf http://localhost:3000/api/health; do sleep 2; done
+ - run: pnpm test:e2e
build:
name: Build
diff --git a/src/web/src/test/e2e-setup.ts b/src/web/src/test/e2e-setup.ts
index 126ff7b98..5402b42a4 100644
--- a/src/web/src/test/e2e-setup.ts
+++ b/src/web/src/test/e2e-setup.ts
@@ -1,3 +1,3 @@
if (!process.env.APP_URL) {
- process.env.APP_URL = "http://localhost:8787"
+ process.env.APP_URL = "http://localhost:3000"
}
diff --git a/src/web/src/test/e2e/auth.test.ts b/src/web/src/test/e2e/auth.test.ts
index 6026f5514..5298a70ba 100644
--- a/src/web/src/test/e2e/auth.test.ts
+++ b/src/web/src/test/e2e/auth.test.ts
@@ -3,7 +3,7 @@ import { randomUUID } from "crypto"
import { signUp, signIn, sessionRequest } from "../helpers/auth"
import { sql } from "../helpers/db"
-const APP_URL = process.env.APP_URL ?? "http://localhost:8787"
+const APP_URL = process.env.APP_URL ?? "http://localhost:3000"
const testEmail = `e2e_auth_${randomUUID().slice(0, 8)}@test.local`
const testPassword = "TestPassword123!"
diff --git a/src/web/src/test/e2e/daemon-lifecycle.test.ts b/src/web/src/test/e2e/daemon-lifecycle.test.ts
index 960c031e4..92700b868 100644
--- a/src/web/src/test/e2e/daemon-lifecycle.test.ts
+++ b/src/web/src/test/e2e/daemon-lifecycle.test.ts
@@ -86,7 +86,7 @@ describe("daemon lifecycle", () => {
})
it("POST /api/daemon/heartbeat rejects without machine token", async () => {
- const APP_URL = process.env.APP_URL ?? "http://localhost:8787"
+ const APP_URL = process.env.APP_URL ?? "http://localhost:3000"
const res = await fetch(`${APP_URL}/api/daemon/heartbeat`, {
method: "POST",
headers: { "Content-Type": "application/json" },
diff --git a/src/web/src/test/e2e/health.test.ts b/src/web/src/test/e2e/health.test.ts
index 9cfcef49c..f024e1e22 100644
--- a/src/web/src/test/e2e/health.test.ts
+++ b/src/web/src/test/e2e/health.test.ts
@@ -1,6 +1,6 @@
import { describe, it, expect } from "vitest"
-const APP_URL = process.env.APP_URL ?? "http://localhost:8787"
+const APP_URL = process.env.APP_URL ?? "http://localhost:3000"
describe("health check", () => {
it("GET /api/health returns 200 with status ok", async () => {
diff --git a/src/web/src/test/helpers/auth.ts b/src/web/src/test/helpers/auth.ts
index 371117049..b31f73454 100644
--- a/src/web/src/test/helpers/auth.ts
+++ b/src/web/src/test/helpers/auth.ts
@@ -1,4 +1,4 @@
-const APP_URL = process.env.APP_URL ?? "http://localhost:8787"
+const APP_URL = process.env.APP_URL ?? "http://localhost:3000"
/**
* Sign up a new user via Better Auth.