Add deployed apps gateway #601
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: π§ͺ E2E Tests | |
| on: | |
| push: | |
| branches: [main, dev] | |
| pull_request: | |
| branches: [main, dev] | |
| workflow_dispatch: | |
| concurrency: | |
| group: e2e-tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e-tests: | |
| name: π§ͺ Run E2E Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v4 | |
| - name: π¦ Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| - name: π¦ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.tool-versions' | |
| cache: 'pnpm' | |
| - name: π Update .env file | |
| run: | | |
| # Copy .env.example to .env first | |
| cp .env.example .env | |
| # Set mandatory values in .env because we can't set them interactively through the CLI from GitHub action | |
| echo "LICENSE_KEY=premium" >> .env | |
| echo "ANTHROPIC_API_KEY=${{ secrets.DUMMY_ANTHROPIC_API_KEY }}" >> .env | |
| echo "DEFAULT_LLM_PROVIDER=Google" >> .env | |
| echo "DEFAULT_LLM_MODEL=gemini-2.5-flash" >> .env | |
| echo "GOOGLE_GENERATIVE_AI_API_KEY=${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}" >> .env | |
| echo "AUTH_SECRET=${{ secrets.AUTH_SECRET }}" >> .env | |
| echo "ENCRYPTION_KEY=${{ secrets.ENCRYPTION_KEY }}" >> .env | |
| echo "ENABLE_TEST_LOGIN_ENDPOINT=true" >> .env | |
| - name: π³ Run liblab quickstart | |
| run: | | |
| # Start the database and app using docker compose directly | |
| pnpm run quickstart | |
| # Wait for the app to be ready | |
| echo "β³ Waiting for the application to be ready..." | |
| timeout 300 bash -c 'until curl -s http://localhost:3000 > /dev/null; do sleep 5; done' | |
| echo "β Application is ready!" | |
| - name: π Show Docker ai-app container logs | |
| run: | | |
| echo "π Container logs:" | |
| docker compose logs --tail=200 ai-app | |
| - name: π§ͺ Install E2E test dependencies | |
| working-directory: tests/e2e | |
| run: | | |
| npm install | |
| npx playwright install chromium | |
| - name: π§ͺ Run E2E tests | |
| working-directory: tests/e2e | |
| run: pnpm test | |
| env: | |
| BASE_URL: http://localhost:3000 | |
| CI: true | |
| - name: π Show Docker ai-app container logs after test run | |
| if: always() | |
| run: | | |
| echo "π Container logs:" | |
| docker compose logs --tail=200 ai-app | |
| - name: π Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: tests/e2e/playwright-report/ | |
| retention-days: 30 | |
| - name: π Upload test videos | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-videos | |
| path: tests/e2e/test-results/ | |
| retention-days: 30 | |
| - name: π§Ή Cleanup Docker services | |
| if: always() | |
| run: docker compose down |