test: rebuild backend/test runner and wait for mysql #2

Merged
hzhang merged 1 commits from chore/test-runner-rebuild into master 2026-03-15 16:23:46 +00:00
3 changed files with 14 additions and 1 deletions

View File

@@ -54,6 +54,9 @@ services:
SECRET_KEY: ${SECRET_KEY:-change_me_in_production} SECRET_KEY: ${SECRET_KEY:-change_me_in_production}
LOG_LEVEL: ${LOG_LEVEL:-INFO} LOG_LEVEL: ${LOG_LEVEL:-INFO}
DATABASE_URL: mysql+pymysql://harborforge:harborforge_pass@mysql:${MYSQL_PORT:-3306}/harborforge DATABASE_URL: mysql+pymysql://harborforge:harborforge_pass@mysql:${MYSQL_PORT:-3306}/harborforge
depends_on:
mysql:
condition: service_healthy
networks: networks:
- test-network - test-network

View File

@@ -63,6 +63,16 @@ echo "🔨 Building frontend..."
docker rmi harborforge-test-frontend:dev 2>/dev/null || true docker rmi harborforge-test-frontend:dev 2>/dev/null || true
docker compose -f "$COMPOSE_FILE" build --no-cache --build-arg VITE_API_BASE=http://backend:8000 frontend docker compose -f "$COMPOSE_FILE" build --no-cache --build-arg VITE_API_BASE=http://backend:8000 frontend
# Build backend (force no cache, remove image first)
echo "🔨 Building backend..."
docker rmi harborforge-test-backend:dev 2>/dev/null || true
docker compose -f "$COMPOSE_FILE" build --no-cache backend
# Build test runner (force no cache, remove image first)
echo "🔨 Building test runner..."
docker rmi harborforge-test-runner:dev 2>/dev/null || true
docker compose -f "$COMPOSE_FILE" build --no-cache test
# Start services # Start services
echo "📦 Starting services..." echo "📦 Starting services..."
docker compose -f "$COMPOSE_FILE" up -d docker compose -f "$COMPOSE_FILE" up -d