Skip to content

Commit 6adb2a6

Browse files
committed
Add web health check
1 parent 2bc65ca commit 6adb2a6

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

.github/workflows/evals.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ jobs:
9090
docker compose exec -T web sh -c 'nc -z redis 6379 && echo "✓ Redis connection successful"'
9191
9292
echo "Testing web service startup..."
93-
timeout 30 bash -c 'until curl -f http://localhost:3000 2>/dev/null || curl -f http://localhost:3000/health 2>/dev/null; do sleep 2; done' || echo "Web service may not have health endpoint, continuing..."
93+
timeout 60 bash -c 'until curl -f http://localhost:3000/api/health 2>/dev/null; do echo "Waiting for web service..."; sleep 2; done'
94+
95+
echo "✓ Web service is healthy"
96+
echo "Health check response:"
97+
curl -s http://localhost:3000/api/health | jq 2>/dev/null || curl -s http://localhost:3000/api/health
9498
9599
- name: Test runner container networking
96100
run: |
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { NextResponse } from "next/server"
2+
3+
export async function GET() {
4+
try {
5+
return NextResponse.json(
6+
{
7+
status: "healthy",
8+
timestamp: new Date().toISOString(),
9+
uptime: process.uptime(),
10+
environment: process.env.NODE_ENV || "production",
11+
},
12+
{ status: 200 },
13+
)
14+
} catch (error) {
15+
return NextResponse.json(
16+
{
17+
status: "unhealthy",
18+
timestamp: new Date().toISOString(),
19+
error: error instanceof Error ? error.message : "Unknown error",
20+
},
21+
{ status: 503 },
22+
)
23+
}
24+
}

packages/evals/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"db:start": "docker compose up -d db",
2222
"db:stop": "docker compose down db",
2323
"redis:start": "docker compose up -d redis",
24-
"redis:stop": "docker compose down redis"
24+
"redis:stop": "docker compose down redis",
25+
"services:start": "docker compose up -d db redis"
2526
},
2627
"dependencies": {
2728
"@roo-code/ipc": "workspace:^",

packages/evals/src/cli/runCi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { createRun, createTask } from "../db/index.js"
66
import { runEvals } from "./runEvals.js"
77

88
export const runCi = async ({
9-
concurrency = 3,
10-
exercisesPerLanguage = 3,
9+
concurrency = 1,
10+
exercisesPerLanguage = 1,
1111
}: {
1212
concurrency?: number
1313
exercisesPerLanguage?: number

0 commit comments

Comments
 (0)