Skip to content

Commit 71e4cea

Browse files
committed
feat(ci): fix container networking and add end-to-end webhook integration test
1 parent a0a7444 commit 71e4cea

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@
233233

234234

235235

236-
237236
name: CI Pipeline
238237

239238
on:
@@ -271,10 +270,6 @@ jobs:
271270
ports:
272271
- 6379:6379
273272

274-
env:
275-
DATABASE_URL: postgresql://hooktrace:hooktrace_test@localhost:5432/hooktrace_test
276-
REDIS_URL: redis://localhost:6379
277-
278273
steps:
279274
- uses: actions/checkout@v4
280275

@@ -301,15 +296,20 @@ jobs:
301296
# SYSTEM INTEGRATION TEST
302297
# -------------------------------
303298

304-
# Start ONLY API (avoid port conflicts)
299+
# Start ONLY API with correct env (THIS IS THE FIX)
305300
- name: Start API
306301
run: |
307302
docker compose up -d api --no-deps
308303
sleep 15
304+
env:
305+
DATABASE_URL: postgresql://hooktrace:hooktrace_test@host.docker.internal:5432/hooktrace_test
306+
REDIS_URL: redis://host.docker.internal:6379
309307

310-
# Debug (optional but useful if something fails)
311-
- name: Show running containers
312-
run: docker ps
308+
# Debug logs (very useful)
309+
- name: Debug API logs
310+
run: |
311+
docker ps -a
312+
docker logs hooktrace-api || true
313313
314314
# Send a test webhook
315315
- name: Send test webhook
@@ -318,7 +318,7 @@ jobs:
318318
-H "Content-Type: application/json" \
319319
-d '{"event":"ci_test","data":{"source":"github-actions"}}'
320320
321-
# Wait for processing (important if async)
321+
# Wait for processing
322322
- name: Wait for processing
323323
run: sleep 5
324324

0 commit comments

Comments
 (0)