Files
wehub-resource-sync a9cd7750f4
CI / detect-changes (push) Waiting to run
CI / build (push) Waiting to run
UI v2 CI / E2E (Mocked) (push) Blocked by required conditions
UI v2 Integration CI / E2E (Integration) (push) Waiting to run
CI / unit-test (push) Blocked by required conditions
CI / test-harness (push) Waiting to run
CI / generate-e2e-matrix (push) Waiting to run
CI / e2e (push) Blocked by required conditions
CI / build-ui (push) Waiting to run
Publish docs via GitHub Pages / Deploy docs (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
UI v2 CI / Lint, Format & Test (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 12:37:56 +08:00

34 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
COMPOSE_FILE="$SCRIPT_DIR/../docker/docker-compose-postgres.yaml"
export SERVER_ROOT_URI="${SERVER_ROOT_URI:-http://localhost:8000}"
echo "Starting Conductor (Postgres + Elasticsearch 7)..."
docker compose -f "$COMPOSE_FILE" build conductor-server
docker compose -f "$COMPOSE_FILE" up -d
echo "Waiting for Conductor server at $SERVER_ROOT_URI/health ..."
for i in $(seq 1 60); do
if curl -sf "$SERVER_ROOT_URI/health" > /dev/null 2>&1; then
echo "Conductor is up after ${i} attempt(s)!"
break
fi
if [ "$i" -eq 60 ]; then
echo "ERROR: Conductor did not start in time"
docker compose -f "$COMPOSE_FILE" logs conductor-server 2>/dev/null || docker compose -f "$COMPOSE_FILE" logs
docker compose -f "$COMPOSE_FILE" down -v
exit 1
fi
echo " Attempt $i/60 — waiting 5s..."
sleep 5
done
cd "$SCRIPT_DIR/.."
./gradlew :conductor-e2e:test -PrunE2E -DSERVER_ROOT_URI="$SERVER_ROOT_URI" "$@"
EXIT_CODE=$?
docker compose -f "$COMPOSE_FILE" down -v
exit $EXIT_CODE