- Notifications
You must be signed in to change notification settings - Fork27
Add e2e tests#331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:staging
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Add e2e tests#331
Changes from1 commit
4906b4c1238be6d96ac6b7b40625783d9f4862a87b692efed4d34598a966b031b880a4f9e369cc124c2ef6c751f2ddeb392e65792d7233b7bfa04c1610c3f5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -11,103 +11,117 @@ | ||
| jobs: | ||
| test: | ||
| timeout-minutes: 60 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| # Setup Python | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
| # Setup Node.js | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| # Install pipenv | ||
| - name: Install pipenv | ||
| run: pip install pipenv | ||
| # Install Python dependencies | ||
| - name: Install Python dependencies | ||
| run: pipenv sync --dev | ||
| # Install Node dependencies (frontend) | ||
| - name: Install frontend dependencies | ||
| run: npm ci | ||
| # Start Docker Compose services (test databases) | ||
| - name: Start test databases | ||
| run: | | ||
| docker compose -f e2e/docker-compose.test.yml up -d | ||
| # Wait for databases to be healthy | ||
| echo "Waiting for databases to be ready..." | ||
| sleep20 | ||
| docker ps -a | ||
| # Verify all containers are running | ||
| docker compose -f e2e/docker-compose.test.yml ps | ||
| # Start FalkorDB (Redis graph database) | ||
| - name: Start FalkorDB | ||
| run: | | ||
| docker run -d --name falkordb-test -p 6379:6379 falkordb/falkordb:latest | ||
| sleep 5 | ||
| docker ps -a | ||
| # Start the FastAPI applicationwith frontend build | ||
| - name: Start FastAPI application | ||
| run: | | ||
| # Build frontend and start server in background using Make | ||
| make run-prod > /tmp/uvicorn.log 2>&1 & | ||
| UVICORN_PID=$! | ||
| echo "Started server with PID: $UVICORN_PID" | ||
| # Wait for app to start | ||
| echo "Waiting for application to start..." | ||
| for i in {1..30}; do | ||
| if curl -f http://localhost:5000/ 2>/dev/null; then | ||
| echo "Application started successfully!" | ||
| break | ||
| fi | ||
| echo "Waiting... attempt $i/30" | ||
| sleep 1 | ||
| if [ $i -eq 30 ]; then | ||
| echo "Failed to start application after 30 seconds" | ||
| echo "=== Server logs ===" | ||
| cat /tmp/uvicorn.log | ||
| exit 1 | ||
| fi | ||
| done | ||
| env: | ||
| HOST: localhost | ||
| PORT: 5000 | ||
| PYTHONUNBUFFERED: 1 | ||
| FASTAPI_SECRET_KEY: test-secret-key-for-ci | ||
| APP_ENV: development | ||
| FASTAPI_DEBUG: False | ||
| FALKORDB_HOST: localhost | ||
| FALKORDB_PORT: 6379 | ||
| DISABLE_MCP: true | ||
| # Install Playwright browsers | ||
| - name: Install Playwright Browsers | ||
| run: npx playwright install --with-deps chromium firefox | ||
| # Run Playwright tests | ||
| - name: Run Playwright tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. [blocker]: Playwright CI never launches backend. The Playwright workflow installs dependencies and immediately runs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. [blocker] This job installs deps and immediately executes | ||
| run: npx playwright test --reporter=list | ||
| env: | ||
| CI: true | ||
| # Upload test results on failure | ||
| - uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: playwright-report | ||
| path: playwright-report/ | ||
| retention-days: 30 | ||
| # Upload test screenshots on failure | ||
| - uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: test-results | ||
| path: test-results/ | ||
| retention-days: 30 | ||
| # Cleanup - Stop all containers | ||
| - name: Cleanup Docker containers | ||
| if: always() | ||
| run: | | ||
| docker compose -f e2e/docker-compose.test.yml down -v || true | ||
| docker stop falkordb-test || true | ||
| docker rm falkordb-test || true | ||
Uh oh!
There was an error while loading.Please reload this page.