feat: the stale-stream recovery names itself and resumes where playback stalled #1537
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: 'frontend' | |
| # Always fires; the `filter` job decides whether downstream steps run | |
| # the real pipeline or no-op. See rust.yml for the design rationale — | |
| # this pattern keeps every required-check name reporting once per SHA | |
| # without inverse-twin workflows. | |
| 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 '^(frontend/|pnpm-lock\.yaml$|pnpm-workspace\.yaml$|package\.json$|\.github/workflows/frontend\.yml$)' <<<"$changed"; then | |
| echo "relevant=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "relevant=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| lint-typecheck-test: | |
| needs: filter | |
| name: lint + typecheck + test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - if: needs.filter.outputs.relevant != 'true' | |
| working-directory: ${{ github.workspace }} | |
| run: 'echo "Not required: no frontend changes in this PR"' | |
| - if: needs.filter.outputs.relevant == 'true' | |
| uses: actions/checkout@v4 | |
| - 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: pnpm install --frozen-lockfile | |
| run: pnpm install --frozen-lockfile --filter ani-gui-frontend | |
| # `pnpm run lint` = prettier --check + eslint. | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: lint (prettier + eslint) | |
| run: pnpm run lint | |
| # `pnpm run check` = svelte-kit sync + svelte-check (which also | |
| # runs the TypeScript checker against generated SvelteKit types). | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: typecheck (svelte-check + svelte-kit sync) | |
| run: pnpm run check | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: vitest run | |
| run: pnpm run test | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: vitest run (acceptance — route mounting + MSW) | |
| run: pnpm run test:acceptance | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: vitest run with coverage | |
| # See crap.yml — the locale bundles are generated, so coverage | |
| # runs through the script that regenerates them. | |
| run: pnpm run test:coverage | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: Ratchet — fail if coverage drops | |
| working-directory: ${{ github.workspace }} | |
| run: node tools/check-coverage-baseline.mjs | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: Upload lcov for downstream CRAP job | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-lcov | |
| path: frontend/coverage/lcov.info | |
| retention-days: 7 | |
| - if: needs.filter.outputs.relevant == 'true' | |
| name: production build (vite + adapter-static) | |
| run: pnpm run build |