fix: handle base build failures and add resilient API mocking

- Drop --frozen-lockfile for base builds since the PR's lockfile may not
  match the base branch's package.json
- Add continue-on-error and step dependencies so the workflow continues
  gracefully when base builds fail
- Add catch-all /api/** mock to return empty JSON for unmocked endpoints
- Block socket.io WebSocket connections that prevent networkidle
- Add networkidle timeout fallback in screenshot runner

https://claude.ai/code/session_01XSTqDJXuR4jaLN7SGm3uES
This commit is contained in:
Claude
2026-03-01 19:41:03 +00:00
committed by Zack Pollard
parent cf1a9ed3f5
commit c5abd18a64

View File

@@ -203,16 +203,20 @@ jobs:
- name: Build SDK (base)
if: steps.routes.outputs.has_routes == 'true'
run: pnpm install --frozen-lockfile && pnpm build
continue-on-error: true
id: base-sdk
run: pnpm install && pnpm build
working-directory: ./open-api/typescript-sdk
- name: Build web (base)
if: steps.routes.outputs.has_routes == 'true'
run: pnpm install --frozen-lockfile && pnpm build
if: steps.routes.outputs.has_routes == 'true' && steps.base-sdk.outcome == 'success'
continue-on-error: true
id: base-web
run: pnpm install && pnpm build
working-directory: ./web
- name: Take screenshots (base)
if: steps.routes.outputs.has_routes == 'true'
if: steps.routes.outputs.has_routes == 'true' && steps.base-web.outcome == 'success'
env:
PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS: '1'
SCREENSHOT_OUTPUT_DIR: ${{ github.workspace }}/screenshots/base