|
23 | 23 |
|
24 | 24 | - name: Wait for services to be healthy |
25 | 25 | run: | |
26 | | - echo "Waiting for all services to be healthy..." |
27 | | - # Wait for services with health checks to be healthy (7 services) and all services to be up |
28 | | - # Increased timeout to 10 minutes for CI environment |
29 | | - timeout 600 bash -c 'while true; do |
30 | | - echo "=== Detailed Service Status ===" |
31 | | - docker compose ps --format "table {{.Name}}\t{{.Status}}\t{{.Health}}" |
32 | | - echo "=== Unhealthy Services ===" |
33 | | - unhealthy_services=$(docker compose ps --format "{{.Name}} {{.Health}}" | grep -v healthy | grep -v "^[[:space:]]*$" || echo "") |
34 | | - if [ -n "$unhealthy_services" ]; then |
35 | | - echo "$unhealthy_services" |
36 | | - echo "=== Logs for unhealthy services ===" |
37 | | - for service in $(echo "$unhealthy_services" | awk "{print \$1}"); do |
38 | | - echo "--- Logs for $service ---" |
39 | | - docker compose logs --tail=10 "$service" || echo "No logs for $service" |
40 | | - done |
41 | | - else |
42 | | - echo "All services healthy or no health check" |
43 | | - fi |
44 | | - healthy_count=$(docker compose ps --format "{{.Health}}" | grep -c "healthy" || echo "0") |
45 | | - up_count=$(docker compose ps --format "{{.Status}}" | grep -c "Up" || echo "0") |
46 | | - echo "Progress: $healthy_count/7 healthy, $up_count services up" |
47 | | - if [ "$healthy_count" -ge 7 ] && [ "$up_count" -ge 7 ]; then |
48 | | - echo "All services are healthy!" |
49 | | - break |
50 | | - fi |
51 | | - sleep 10 |
52 | | - done' |
| 26 | + echo Pausing for 60s to allow services to start |
| 27 | + sleep 60 |
53 | 28 | docker compose ps |
54 | 29 | |
55 | 30 | - name: Test dashboard endpoints |
|
61 | 36 | run: | |
62 | 37 | # Test sticker award API with sample user data |
63 | 38 | curl -f -X GET "http://localhost:8080/api/award/v1/users/user-001/stickers" || exit 1 |
64 | | - # TODO! |
65 | | - # curl -f -X GET "http://localhost:8080/api/users/v1/health" || exit 1 |
| 39 | + curl -f -X GET "http://localhost:8080/api/users/v1/health" || exit 1 |
66 | 40 | |
67 | 41 | - name: Show service logs on failure |
68 | 42 | if: failure() |
|
0 commit comments