fix: restore complete E2E workflow structure

- Restore missing workflow metadata (name, on, jobs)
- Fix YAML structure that got corrupted during edits
- Ensure E2E tests will run on PRs and pushes to main/master
This commit is contained in:
DhanushSantosh
2026-01-09 22:44:57 +05:30
parent 7bdf5e4261
commit 7e768b6290

View File

@@ -1,3 +1,33 @@
name: E2E Tests
on:
pull_request:
branches:
- '*'
push:
branches:
- main
- master
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup-project
with:
check-lockfile: 'true'
rebuild-node-pty-path: 'apps/server'
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
working-directory: apps/ui
- name: Build server - name: Build server
run: npm run build --workspace=apps/server run: npm run build --workspace=apps/server
@@ -39,3 +69,32 @@
echo "Testing health endpoint..." echo "Testing health endpoint..."
curl -v http://localhost:3008/api/health 2>&1 || echo "Health endpoint failed" curl -v http://localhost:3008/api/health 2>&1 || echo "Health endpoint failed"
exit 1 exit 1
- name: Run E2E tests
# Playwright automatically starts the Vite frontend via webServer config
# (see apps/ui/playwright.config.ts) - no need to start it manually
run: npm run test --workspace=apps/ui
env:
CI: true
VITE_SERVER_URL: http://localhost:3008
VITE_SKIP_SETUP: 'true'
# Keep UI-side login/defaults consistent
AUTOMAKER_API_KEY: test-api-key-for-e2e-tests
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: apps/ui/playwright-report/
retention-days: 7
- name: Upload test results (screenshots, traces, videos)
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: |
apps/ui/test-results/
retention-days: 7
if-no-files-found: ignore