Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add deployed apps gateway #601

Add deployed apps gateway

Add deployed apps gateway #601

Workflow file for this run

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