Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: E2E Tests

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install Playwright browsers
run: npx playwright install --with-deps chromium

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install Python dependencies
run: |
cd mcp-server
pip install -r requirements.txt

- name: Start backend services
run: |
cd mcp-server
python master_orchestrator_api.py &
BACKEND_PID=$!
echo "Waiting for backend to be ready..."
for i in {1..30}; do
if curl -f http://localhost:8000/health > /dev/null 2>&1; then
echo "Backend is ready!"
break
fi
if [ $i -eq 30 ]; then
echo "Backend failed to start within 30 seconds"
exit 1
fi
echo "Waiting... ($i/30)"
sleep 1
done
env:
JWT_SECRET_KEY: test-secret-key-for-ci
DATABASE_URL: sqlite:///./test.db

- name: Start frontend
run: |
cd dashboard-ui
npm install
npm run dev &
FRONTEND_PID=$!
echo "Waiting for frontend to be ready..."
for i in {1..30}; do
if curl -f http://localhost:3000 > /dev/null 2>&1; then
echo "Frontend is ready!"
break
fi
if [ $i -eq 30 ]; then
echo "Frontend failed to start within 30 seconds"
exit 1
fi
echo "Waiting... ($i/30)"
sleep 1
done
env:
VITE_API_URL: http://localhost:8000

- name: Run E2E tests
run: npm run test:e2e
env:
CI: true
API_BASE_URL: http://localhost:8000
BASE_URL: http://localhost:3000

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: test-results/
retention-days: 30

- name: Upload HTML report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-html-report
path: test-results/html/
retention-days: 30
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Node modules
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Test results
test-results/
playwright-report/
playwright/.cache/

# Playwright browsers
.playwright/

# Build outputs
dist/
build/
*.tsbuildinfo

# Environment variables
.env
.env.local
.env.*.local

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
venv/
ENV/
env/

# Logs
logs/
*.log
Loading