31 lines
386 B
Bash
Executable file
31 lines
386 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
# Kill any existing backend
|
|
pkill -f "uvicorn main:app" 2>/dev/null || true
|
|
sleep 1
|
|
|
|
# Start db
|
|
docker compose up -d db
|
|
|
|
# Start backend
|
|
cd backend
|
|
uv run uvicorn main:app --port 8000 &
|
|
PID=$!
|
|
cd ..
|
|
|
|
# Wait for backend
|
|
sleep 2
|
|
|
|
# Run tests
|
|
cd frontend
|
|
npm run test:e2e
|
|
EXIT_CODE=$?
|
|
|
|
# Cleanup
|
|
kill $PID 2>/dev/null || true
|
|
|
|
exit $EXIT_CODE
|
|
|