ci: re-warm routes immediately before smoke run
CI / Architecture Guardrails (push) Successful in 2m43s
CI / Lint (push) Successful in 6m16s
CI / Typecheck (push) Successful in 6m40s
CI / Unit Tests (push) Failing after 6m44s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Assistant Split Regression (push) Successful in 8m46s
CI / Architecture Guardrails (push) Successful in 2m43s
CI / Lint (push) Successful in 6m16s
CI / Typecheck (push) Successful in 6m40s
CI / Unit Tests (push) Failing after 6m44s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Assistant Split Regression (push) Successful in 8m46s
The initial warm-up runs ~4 minutes before the smoke tests (seed, Node setup, Playwright install all take real time on the QNAP runner). Between those steps, Next.js dev server can evict or recompile routes under memory pressure — test #2 kept hitting ERR_CONNECTION_REFUSED on / (139ms, consistently) while /auth/signin, login, and authed nav all passed cleanly in the same run. Re-warm both routes right before Playwright starts so the server is guaranteed hot at the moment smoke test #2 navigates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -587,6 +587,29 @@ jobs:
|
||||
ln -sfn /tmp/pw-install/node_modules/playwright-core apps/web/node_modules/playwright-core
|
||||
/tmp/pw-install/node_modules/.bin/playwright install chromium --with-deps
|
||||
|
||||
- name: Re-warm routes immediately before smoke run
|
||||
# The earlier warm-up runs ~4 minutes before the smoke tests (seed,
|
||||
# Node setup, Playwright install all take real time on QNAP). In
|
||||
# between, the Next.js dev server on a constrained host can evict
|
||||
# or recompile routes under memory pressure — test #2 kept hitting
|
||||
# ERR_CONNECTION_REFUSED on / while tests for /auth/signin and api
|
||||
# routes worked fine. Re-warm both routes (same IP pin) just
|
||||
# before Playwright starts so the server is guaranteed hot.
|
||||
run: |
|
||||
warm() {
|
||||
local path="$1"
|
||||
local expect="$2"
|
||||
for i in $(seq 1 24); do
|
||||
CODE=$(curl -s -o /dev/null -w "%{http_code}" --max-time 30 "${APP_BASE_URL}${path}" || echo "000")
|
||||
echo "Re-warm ${path} $i: HTTP $CODE"
|
||||
if [ "$CODE" = "$expect" ]; then return 0; fi
|
||||
sleep 3
|
||||
done
|
||||
echo "Re-warm ${path} did not reach $expect; continuing anyway"
|
||||
}
|
||||
warm / 307
|
||||
warm /auth/signin 200
|
||||
|
||||
- name: Run smoke tests
|
||||
# Use the pinned APP_BASE_URL (explicit IP) so Chromium hits the same
|
||||
# container as the warm-up probes.
|
||||
|
||||
Reference in New Issue
Block a user