mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-18 10:51:28 +00:00
e2e
This commit is contained in:
parent
5e5ebb5630
commit
a68c8b0956
35
.github/workflows/cache-verify.yml
vendored
35
.github/workflows/cache-verify.yml
vendored
@ -177,6 +177,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
jobs: 8
|
||||
PATH: "/opt:${PATH}"
|
||||
strategy:
|
||||
matrix:
|
||||
job: [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
@ -232,16 +233,32 @@ jobs:
|
||||
run: |
|
||||
docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach backend mailserver webapp
|
||||
|
||||
- name: Wait for services
|
||||
- name: Wait for essential services
|
||||
run: |
|
||||
for i in {1..60}; do
|
||||
curl -sf http://localhost:3000 && echo "✅ Webapp ready" && break
|
||||
echo "Waiting... ($i/60)"
|
||||
sleep 2
|
||||
done
|
||||
echo "❌ Timeout: webapp did not start in time"
|
||||
docker compose logs
|
||||
exit 1
|
||||
wait_for() {
|
||||
local name="$1"
|
||||
local url="$2"
|
||||
echo "⏳ Waiting for $name ($url)..."
|
||||
for i in {1..60}; do
|
||||
if curl -sf "$url" > /dev/null; then
|
||||
echo "✅ $name is ready"
|
||||
return 0
|
||||
fi
|
||||
echo "Waiting for $name... ($i/60)"
|
||||
sleep 2
|
||||
done
|
||||
echo "❌ Timeout: $name did not respond at $url"
|
||||
docker compose logs "$name"
|
||||
return 1
|
||||
}
|
||||
|
||||
# Check each essential service
|
||||
wait_for "webapp" "http://localhost:3000"
|
||||
wait_for "backend" "http://localhost:4000/api/health"
|
||||
wait_for "mailserver" "http://localhost:1080"
|
||||
wait_for "minio" "http://localhost:9000/minio/health/live"
|
||||
|
||||
echo "🎉 All services are up."
|
||||
|
||||
- name: Full stack tests | run tests
|
||||
id: e2e-tests
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user