ci: harden Playwright smoke retry
Use the lockfile-installed CLI and retry only runner SIGSEGV failures. Avoid reinstalling dependencies through the same unreliable transport after a transient crash.
This commit is contained in:
@@ -192,7 +192,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Install browser smoke runtime
|
- name: Install browser smoke runtime
|
||||||
working-directory: job-tracker-ui
|
working-directory: job-tracker-ui
|
||||||
run: npx playwright install --with-deps chromium
|
env:
|
||||||
|
PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT: '120000'
|
||||||
|
run: |
|
||||||
|
# Invoke the lockfile-installed CLI directly. `npx` may create a second
|
||||||
|
# temporary dependency tree when its cache is damaged, which made this
|
||||||
|
# runner's intermittent truncated downloads substantially worse.
|
||||||
|
node ./node_modules/@playwright/test/cli.js install --with-deps chromium
|
||||||
|
|
||||||
- name: Test browser smoke flows
|
- name: Test browser smoke flows
|
||||||
working-directory: job-tracker-ui
|
working-directory: job-tracker-ui
|
||||||
@@ -200,22 +206,25 @@ jobs:
|
|||||||
# Exercise the deployable frontend and avoid Turbopack's persistence crashes on
|
# Exercise the deployable frontend and avoid Turbopack's persistence crashes on
|
||||||
# this runner's slow Docker volume.
|
# this runner's slow Docker volume.
|
||||||
PLAYWRIGHT_STATIC_EXPORT: 'true'
|
PLAYWRIGHT_STATIC_EXPORT: 'true'
|
||||||
# This self-hosted runner has twice corrupted Playwright's installed JS/browser
|
# The runner occasionally terminates an otherwise healthy Node process with
|
||||||
# payload (invalid control bytes followed by SIGSEGV/139). Retry the complete
|
# SIGSEGV/139. Retry only that infrastructure signature. Do not reinstall npm
|
||||||
# suite once from a verified, clean install. The retry is intentionally bounded;
|
# or browser payloads here: doing so used to redownload hundreds of megabytes
|
||||||
# a genuine or repeated browser-test failure still blocks deployment.
|
# through the same unreliable transport and made a transient crash persistent.
|
||||||
|
# Assertion/configuration failures remain terminal and always block deployment.
|
||||||
run: |
|
run: |
|
||||||
if npm run test:e2e; then
|
set +e
|
||||||
|
npm run test:e2e
|
||||||
|
smoke_status=$?
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$smoke_status" -eq 0 ]; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
fi
|
||||||
smoke_status=$?
|
if [ "$smoke_status" -ne 139 ]; then
|
||||||
|
exit "$smoke_status"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Browser smoke failed ($smoke_status) — rebuilding the browser runtime and retrying once..."
|
echo "Browser smoke process crashed with SIGSEGV — retrying the unchanged suite once..."
|
||||||
rm -rf node_modules
|
|
||||||
recovery_cache="$(mktemp -d)"
|
|
||||||
npm ci --no-audit --no-fund --cache "$recovery_cache"
|
|
||||||
npx playwright install --with-deps --force chromium
|
|
||||||
npm run test:e2e
|
npm run test:e2e
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Build frontend
|
||||||
|
|||||||
Reference in New Issue
Block a user