fix(ci): retain and retry the observed Playwright runtime corruption
CI and Deploy / test (push) Failing after 1h18m39s
CI and Deploy / deploy (push) Has been skipped

This commit is contained in:
cesnimda
2026-10-20 15:17:02 +02:00
parent cc7977131a
commit d1fcd23087
3 changed files with 69 additions and 3 deletions
+11 -3
View File
@@ -312,9 +312,16 @@ jobs:
# checksum-valid npm download (`true` became `tr<garbage>e`, or a stray `break` appeared).
# Retry only that unmistakable source-corruption signature from a new isolated cache.
# Ordinary Axe violations and application assertions remain terminal.
if grep -q "AxeBuilder.analyze" "$smoke_log" \
&& grep -Eq "page\.evaluate: (ReferenceError|SyntaxError)" "$smoke_log"; then
echo "Axe runtime source appears corrupted — reinstalling the locked dependencies from a fresh cache and retrying the complete suite once..."
if { grep -q "AxeBuilder.analyze" "$smoke_log" \
&& grep -Eq "page\.evaluate: (ReferenceError|SyntaxError)" "$smoke_log"; } \
|| { grep -Eq 'node_modules/playwright-core/lib/utilsBundle\.js:[0-9]+' "$smoke_log" \
&& grep -Fq 'const { items }$= this;' "$smoke_log" \
&& grep -Fq 'SyntaxError: Missing initializer in destructuring declaration' "$smoke_log"; }; then
echo "Browser runtime source appears corrupted — reinstalling the locked dependencies from a fresh cache and retrying the complete suite once..."
mkdir -p .artifacts/browser-runtime-attempt-1
cp "$smoke_log" .artifacts/browser-runtime-attempt-1/smoke.log
if [ -d test-results ]; then cp -a test-results .artifacts/browser-runtime-attempt-1/; fi
if [ -f .artifacts/playwright-results.json ]; then cp .artifacts/playwright-results.json .artifacts/browser-runtime-attempt-1/; fi
rm -rf node_modules
npm_cache="$(mktemp -d)"
npm ci --no-audit --no-fund --cache "$npm_cache"
@@ -336,6 +343,7 @@ jobs:
name: browser-diagnostics
path: |
job-tracker-ui/.artifacts/playwright-results.json
job-tracker-ui/.artifacts/browser-runtime-attempt-1/
job-tracker-ui/test-results
retention-days: 7