feat: the stale-stream recovery names itself and resumes where playback stalled #1535
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'e2e (Playwright + Electron)' | |
| # Runs the Electron e2e harness in `electron/e2e/`. Self-contained: | |
| # rebuilds the Rust backend, the SvelteKit bundle, and the unpacked | |
| # Electron app, then drives the packaged binary via `_electron.launch()` | |
| # under Xvfb. The test suite is deliberately small (~3 hermetic | |
| # scenarios); add more cases here when feature work crosses the UI. | |
| # | |
| # Always fires; the `filter` job decides whether downstream steps run | |
| # the real pipeline or no-op. See rust.yml for the design rationale. | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| filter: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| relevant: ${{ steps.detect.outputs.relevant }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - id: detect | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| run: | | |
| set -euo pipefail | |
| if [[ "${{ github.event_name }}" != "pull_request" ]]; then | |
| echo "relevant=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| # See rust.yml's filter for why we avoid `git diff | grep -q` | |
| # under pipefail (SIGPIPE on early grep exit kills the diff). | |
| changed=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA") | |
| if grep -qE '^(backend/|frontend/|electron/|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|package\.json$|\.github/workflows/e2e\.yml$)' <<<"$changed"; then | |
| echo "relevant=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "relevant=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| e2e: | |
| needs: filter | |
| name: Playwright + _electron | |
| runs-on: ubuntu-latest | |
| steps: | |
| - if: needs.filter.outputs.relevant != 'true' | |
| run: 'echo "Not required: no backend / frontend / electron changes in this PR"' | |
| - if: needs.filter.outputs.relevant == 'true' | |
| uses: actions/checkout@v4 | |
| - if: needs.filter.outputs.relevant == 'true' | |
| uses: dtolnay/rust-toolchain@stable | |
| - if: needs.filter.outputs.relevant == 'true' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: backend | |
| shared-key: e2e | |
| - if: needs.filter.outputs.relevant == 'true' | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - if: needs.filter.outputs.relevant == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: Linux deps for Electron + Xvfb | |
| # Electron's chrome process needs the standard NSS / X / GTK | |
| # bundle even in headless Xvfb mode. `xvfb-run` is the wrapper | |
| # we invoke playwright through. The list mirrors what the | |
| # AppImage runtime expects on a clean runner. | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| xvfb \ | |
| libnss3 libatk1.0-0t64 libatk-bridge2.0-0t64 \ | |
| libcups2t64 libdrm2 libxkbcommon0 libxcomposite1 \ | |
| libxdamage1 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 \ | |
| libcairo2 libasound2t64 | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: pnpm install (workspace) | |
| run: pnpm install --frozen-lockfile | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: Build Rust backend (release) | |
| working-directory: electron | |
| run: pnpm run build:backend | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: Build SvelteKit static bundle | |
| working-directory: electron | |
| run: pnpm run build:frontend | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: Package the Electron app (produces dist/linux-unpacked/) | |
| working-directory: electron | |
| run: pnpm run dist | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: Run Playwright tests under Xvfb | |
| working-directory: electron | |
| run: xvfb-run --auto-servernum pnpm run e2e:fast | |
| - if: failure() && needs.filter.outputs.relevant == 'true' | |
| name: Upload Playwright report on failure | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: electron/playwright-report/ | |
| retention-days: 14 |