From 89f1ee328fd09a3a783851b585e29e15e1aa0000 Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Fri, 29 Aug 2025 23:06:39 -0600 Subject: [PATCH] Fix server startup: Use explicit host binding and verification for all jobs --- .gitea/workflows/ci.yaml | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index f90a543..8230980 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -61,9 +61,15 @@ jobs: - run: npm run build # start app, wait, run tests - - run: npm run start & - env: { CI: true } - - run: npx wait-on http://localhost:3000 + - name: Start Next.js + run: npm run start -- -p 3000 -H 0.0.0.0 & + env: + CI: true + - name: Verify server is up + run: | + sleep 5 + curl -v http://127.0.0.1:3000 || exit 1 + - run: npx wait-on http://127.0.0.1:3000 - run: npx playwright test --project=${{ matrix.browser }} env: { CI: true } @@ -90,9 +96,15 @@ jobs: - run: npm ci - run: npx playwright install --with-deps - run: npm run build - - run: npm run start & - env: { CI: true } - - run: npx wait-on http://localhost:3000 + - name: Start Next.js + run: npm run start -- -p 3000 -H 0.0.0.0 & + env: + CI: true + - name: Verify server is up + run: | + sleep 5 + curl -v http://127.0.0.1:3000 || exit 1 + - run: npx wait-on http://127.0.0.1:3000 # Seed snapshots on main branch only (one-time setup) - name: Seed snapshots (main only) @@ -138,12 +150,16 @@ jobs: - name: Build application run: npm run build - - name: Start application - run: npm run start & - env: { CI: true } - + - name: Start Next.js + run: npm run start -- -p 3000 -H 0.0.0.0 & + env: + CI: true + - name: Verify server is up + run: | + sleep 5 + curl -v http://127.0.0.1:3000 || exit 1 - name: Wait for application - run: npx wait-on http://localhost:3000 + run: npx wait-on http://127.0.0.1:3000 - name: Run Lighthouse CI run: npx lhci autorun --chrome-path="$CHROME_PATH"