Compare commits

...

11 Commits

4 changed files with 21 additions and 3 deletions

View File

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

View File

@@ -58,6 +58,21 @@ echo "📦 Using compose file: $COMPOSE_FILE"
echo "🧹 Cleaning up previous containers..."
docker compose -f "$COMPOSE_FILE" down -v 2>/dev/null || true
# Build frontend with correct API base URL (force no cache, remove image first)
echo "🔨 Building frontend..."
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
# 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
echo "📦 Starting services..."
docker compose -f "$COMPOSE_FILE" up -d
@@ -83,7 +98,7 @@ echo "✅ Services ready!"
# Run test
echo "🧪 Running test..."
docker compose -f "$COMPOSE_FILE" run --rm test
docker compose -f "$COMPOSE_FILE" run --rm -e WORKERS=1 test
TEST_EXIT_CODE=$?
# Cleanup decision based on expose-port