ci(frontend): reuse production build in smoke
This commit is contained in:
@@ -190,6 +190,30 @@ jobs:
|
||||
echo "Frontend test process crashed with SIGSEGV — retrying the complete suite once..."
|
||||
npm test -- --watchAll=false --runInBand
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: job-tracker-ui
|
||||
env:
|
||||
CI: 'false'
|
||||
GENERATE_SOURCEMAP: 'false'
|
||||
NODE_OPTIONS: --max-old-space-size=4096
|
||||
# Build once, then make Playwright serve this exact export. A SIGSEGV-only retry preserves
|
||||
# the runner workaround without hiding an ordinary compiler or type-check failure.
|
||||
run: |
|
||||
set +e
|
||||
npm run build
|
||||
build_status=$?
|
||||
set -e
|
||||
|
||||
if [ "$build_status" -eq 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$build_status" -ne 139 ]; then
|
||||
exit "$build_status"
|
||||
fi
|
||||
|
||||
echo "Frontend build process crashed with SIGSEGV — retrying once..."
|
||||
npm run build
|
||||
|
||||
- name: Install browser smoke runtime
|
||||
working-directory: job-tracker-ui
|
||||
env:
|
||||
@@ -206,6 +230,7 @@ jobs:
|
||||
# Exercise the deployable frontend and avoid Turbopack's persistence crashes on
|
||||
# this runner's slow Docker volume.
|
||||
PLAYWRIGHT_STATIC_EXPORT: 'true'
|
||||
PLAYWRIGHT_PREBUILT_EXPORT: 'true'
|
||||
# The runner occasionally terminates an otherwise healthy Node process with
|
||||
# SIGSEGV/139. Retry only that infrastructure signature. Do not reinstall npm
|
||||
# or browser payloads here: doing so used to redownload hundreds of megabytes
|
||||
@@ -227,19 +252,6 @@ jobs:
|
||||
echo "Browser smoke process crashed with SIGSEGV — retrying the unchanged suite once..."
|
||||
npm run test:e2e
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: job-tracker-ui
|
||||
env:
|
||||
CI: 'false'
|
||||
GENERATE_SOURCEMAP: 'false'
|
||||
NODE_OPTIONS: --max-old-space-size=4096
|
||||
# CRA's build (Terser minify + fork-ts-checker workers) has repeatedly died silently on
|
||||
# this runner with no error output (OOM/SIGSEGV signature — same resource-starved-runner
|
||||
# class as the npm ci and dotnet-install flakes elsewhere in this workflow). Retry once.
|
||||
run: |
|
||||
npm run build \
|
||||
|| ( echo "Frontend build failed ($?) — retrying once..." && npm run build )
|
||||
|
||||
deploy:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
|
||||
Reference in New Issue
Block a user