Skip to content

Add ThinkHaven Method Kit positioning #340

Add ThinkHaven Method Kit positioning

Add ThinkHaven Method Kit positioning #340

Workflow file for this run

name: E2E Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
permissions:
contents: read
checks: write
env:
NODE_VERSION: '20'
jobs:
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
run: npm install
working-directory: apps/web
- name: Install Playwright Browsers
run: |
cd apps/web
npx playwright install chromium
npx playwright install-deps chromium
- name: Setup test environment
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY_TEST }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL_TEST }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY_TEST }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET_TEST }}
NEXTAUTH_URL: http://localhost:3000
run: |
cd apps/web
cp .env.example .env.local
echo "ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY" >> .env.local
echo "NEXT_PUBLIC_SUPABASE_URL=$SUPABASE_URL" >> .env.local
echo "NEXT_PUBLIC_SUPABASE_ANON_KEY=$SUPABASE_ANON_KEY" >> .env.local
echo "SUPABASE_URL=$SUPABASE_URL" >> .env.local
echo "SUPABASE_ANON_KEY=$SUPABASE_ANON_KEY" >> .env.local
echo "NEXTAUTH_SECRET=$NEXTAUTH_SECRET" >> .env.local
echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env.local
- name: Build application
run: |
cd apps/web
npm run build
- name: Start application server
run: |
cd apps/web
npm run start &
sleep 10
curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:3000
- name: Run E2E tests
run: |
cd apps/web
npx playwright test --project=chromium
env:
CI: true
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: |
apps/web/playwright-report/
apps/web/test-results/
retention-days: 7