Skip to content

Commit 5ea7d30

Browse files
committed
chore: simplify e2e workflow
1 parent fa65d85 commit 5ea7d30

2 files changed

Lines changed: 6 additions & 22 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,7 @@ jobs:
3636

3737
- name: Start services
3838
working-directory: packages/test-suite
39-
run: |
40-
docker compose up -d
41-
# Wait for services to be healthy
42-
echo "Waiting for services to be ready..."
43-
sleep 10
44-
# Check if services are up
45-
for i in {1..30}; do
46-
if curl -sf http://localhost:$REPLANE_ADMIN_API_PORT/api/health > /dev/null 2>&1; then
47-
echo "Admin API is ready"
48-
break
49-
fi
50-
echo "Waiting for Admin API... ($i/30)"
51-
sleep 2
52-
done
53-
for i in {1..30}; do
54-
if curl -sf http://localhost:$REPLANE_EDGE_API_PORT/api/health > /dev/null 2>&1; then
55-
echo "Edge API is ready"
56-
break
57-
fi
58-
echo "Waiting for Edge API... ($i/30)"
59-
sleep 2
60-
done
39+
run: docker compose up -d
6140

6241
- name: Run E2E tests
6342
working-directory: packages/test-suite

packages/test-suite/docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ x-replane-common: &replane-common
1010
SECRET_KEY: test-secret-key-for-ci
1111
SUPERUSER_API_KEY: ${REPLANE_SUPERADMIN_API_KEY}
1212
TESTING_MODE: true
13+
healthcheck:
14+
test: ["CMD", "node", "-e", "require('http').get('http://localhost:8080/api/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
15+
interval: 10s
16+
timeout: 5s
17+
retries: 5
1318

1419
services:
1520
postgres:

0 commit comments

Comments
 (0)