@@ -25,14 +25,13 @@ jobs:
2525 - name : 💻 Node setup
2626 uses : ./.github/actions/node-setup
2727
28- - name : ♻️ Restore Turbo Cache
28+ - name : 💾 Cache Playwright browsers
2929 uses : actions/cache@v4
3030 with :
31- path : .turbo
32- key : turbo- ${{ github.ref }}-${{ github.sha }}
31+ path : ~/.cache/ms-playwright
32+ key : ${{ runner.os }}-playwright- ${{ hashFiles('**/pnpm-lock.yaml') }}
3333 restore-keys : |
34- turbo-${{ github.ref }}-
35- turbo-
34+ ${{ runner.os }}-playwright-
3635
3736 - name : 🎭 E2E Setup
3837 uses : ./.github/actions/e2e-setup
4342 run : pnpm --filter @infinum/frontend build
4443 shell : bash
4544
46- - name : 🔍 Debug Build Output
47- run : |
48- echo "📂 Current working directory:"
49- pwd
50- echo ""
51- echo "📁 Contents of apps/frontend:"
52- ls -la apps/frontend/ | head -10
53- echo ""
54- echo "🏗️ Contents of apps/frontend/.next:"
55- ls -la apps/frontend/.next/ || echo "❌ No .next directory found"
56- echo ""
57- echo "📦 Checking for standalone server:"
58- if [ -f "apps/frontend/.next/standalone/apps/frontend/server.js" ]; then
59- echo "✅ Found: apps/frontend/.next/standalone/apps/frontend/server.js"
60- else
61- echo "❌ NOT found: apps/frontend/.next/standalone/apps/frontend/server.js"
62- fi
63- echo ""
64- echo "🔎 Looking for any server.js files:"
65- find apps/frontend/.next -name "server.js" -type f 2>/dev/null || echo "❌ No server.js files found"
66- shell : bash
67-
6845 - name : 🚀 Start Frontend App (Background)
6946 run : |
7047 node apps/frontend/.next/standalone/apps/frontend/server.js &
7956 - name : ⏳ Wait for Frontend to be Ready
8057 run : |
8158 echo "Waiting for frontend to start on http://localhost:3000..."
82- timeout 60s bash -c 'until curl -f http://localhost:3000 > /dev/null 2>&1; do
59+ timeout 20s bash -c 'until curl -f http://localhost:3000 > /dev/null 2>&1; do
8360 echo "Waiting for frontend..."
8461 sleep 3
8562 done'
@@ -94,34 +71,17 @@ jobs:
9471 shell : bash
9572
9673 - name : 🧪 Run Playwright E2E Tests
97- run : pnpm e2e
98- shell : bash
99- env :
100- PLAYWRIGHT_JUNIT_OUTPUT_NAME : test-results.xml
74+ run : |
75+ echo "🎬 Starting Playwright E2E Tests..."
76+ echo "================================================"
77+ pnpm e2e
78+ echo "================================================"
79+ echo "✅ E2E Tests completed!"
10180
10281 - name : 🛑 Stop Frontend App
82+ shell : bash
10383 if : always()
10484 run : |
10585 if [ ! -z "$FRONTEND_PID" ]; then
10686 kill $FRONTEND_PID || true
10787 fi
108- shell : bash
109-
110- - name : 📊 Upload Playwright Report
111- uses : actions/upload-artifact@v4
112- if : ${{ !cancelled() }}
113- with :
114- name : playwright-report-${{ github.run_id }}
115- path : |
116- packages/e2e-frontend/playwright-report/
117- packages/e2e-frontend/test-results/
118- retention-days : 30
119-
120- - name : 📊 Upload Coverage Reports
121- uses : actions/upload-artifact@v4
122- if : success()
123- with :
124- name : e2e-coverage-${{ github.run_id }}
125- path : |
126- reports/a11y/
127- retention-days : 7
0 commit comments