Skip to content

Commit 4b279a6

Browse files
committed
fix(ci): correct YAML indentation and stabilize integration test pipeline
1 parent 04f0776 commit 4b279a6

1 file changed

Lines changed: 11 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@
232232

233233

234234

235-
236235
name: CI Pipeline
237236

238237
on:
@@ -276,27 +275,23 @@ jobs:
276275
- name: Check Docker Compose config
277276
run: docker compose config
278277

279-
# Wait for services
280278
- name: Wait for services
281279
run: sleep 5
282280

283-
# Verify Postgres
284281
- name: Verify Postgres is reachable
285282
run: |
286283
POSTGRES_CONTAINER=$(docker ps --filter "ancestor=postgres:16-alpine" --format "{{.ID}}" | head -n 1)
287284
docker exec $POSTGRES_CONTAINER psql -U hooktrace -d hooktrace_test -c "SELECT 1;"
288285
289-
# Verify Redis
290286
- name: Verify Redis is reachable
291287
run: |
292288
REDIS_CONTAINER=$(docker ps --filter "ancestor=redis:7-alpine" --format "{{.ID}}" | head -n 1)
293289
docker exec $REDIS_CONTAINER redis-cli ping
294290
295291
# -------------------------------
296-
# 🔥 SYSTEM INTEGRATION TEST
292+
# SYSTEM INTEGRATION TEST
297293
# -------------------------------
298294

299-
# Start ONLY API with correct env
300295
- name: Start API
301296
run: |
302297
docker compose up -d api --no-deps
@@ -305,35 +300,30 @@ jobs:
305300
DATABASE_URL: postgresql://hooktrace:hooktrace_test@host.docker.internal:5432/hooktrace_test
306301
REDIS_URL: redis://host.docker.internal:6379
307302

308-
# Debug logs
309303
- name: Debug API logs
310304
run: |
311305
docker ps -a
312306
docker logs hooktrace-api || true
313307
314-
# ✅ Send webhook using Python (no curl dependency)
315308
- name: Send test webhook
316309
run: |
317310
API_CONTAINER=$(docker ps --filter "name=hooktrace-api" --format "{{.ID}}" | head -n 1)
318311
docker exec $API_CONTAINER python -c "
319-
import requests
320-
res = requests.post(
321-
'http://localhost:3001/webhook',
322-
json={'event':'ci_test','data':{'source':'github-actions'}}
323-
)
324-
print(res.status_code, res.text)
325-
assert res.status_code < 400
326-
"
327-
328-
# Wait for processing
312+
import requests
313+
res = requests.post(
314+
'http://localhost:3001/webhook',
315+
json={'event': 'ci_test', 'data': {'source': 'github-actions'}}
316+
)
317+
print(res.status_code, res.text)
318+
assert res.status_code < 400
319+
"
320+
329321
- name: Wait for processing
330322
run: sleep 5
331323

332-
# Verify webhook stored in DB
333324
- name: Verify webhook stored in DB
334325
run: |
335326
POSTGRES_CONTAINER=$(docker ps --filter "ancestor=postgres:16-alpine" --format "{{.ID}}" | head -n 1)
336-
337327
docker exec $POSTGRES_CONTAINER psql -U hooktrace -d hooktrace_test -c "
338-
SELECT * FROM events ORDER BY created_at DESC LIMIT 1;
328+
SELECT * FROM events ORDER BY created_at DESC LIMIT 1;
339329
"

0 commit comments

Comments
 (0)