Skip to content

feat(volar): narrow typeof useRoute in a type context #285

feat(volar): narrow typeof useRoute in a type context

feat(volar): narrow typeof useRoute in a type context #285

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main]
paths-ignore:
- 'packages/docs/**'
- 'packages/playground/**'
- 'packages/playground-file-based/**'
- 'packages/experiments-playground/**'
pull_request:
branches: [main]
paths-ignore:
- 'packages/docs/**'
- 'packages/playground/**'
- 'packages/playground-file-based/**'
- 'packages/experiments-playground/**'
permissions:
contents: read
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
# Official Playwright image with all three browser engines + OS deps baked
# in, so CI no longer spends ~15 min on `playwright install --with-deps`.
# The image MUST match the @playwright/test version in the lockfile
# (currently 1.61.1) or the bundled browsers won't be found; bump both
# together. Pinned by digest (= v1.61.1-noble) so a moved/re-pushed tag
# can't change what runs on untrusted PRs.
container:
image: mcr.microsoft.com/playwright@sha256:5b8f294aff9041b7191c34a4bab3ac270157a28774d4b0660e9743297b697e48
# --user 1001 runs non-root (matches the runner uid and keeps the Chromium
# sandbox enabled); --ipc=host stops Chromium OOM-crashing on a small
# container /dev/shm.
options: --user 1001 --ipc=host
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: lts/*
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build router
run: pnpm run build
working-directory: packages/router
# The HMR projects spin up a Vite dev server per worker and must run
# serially, so they get their own single-worker invocation first.
- name: Run HMR tests (single worker)
run: pnpm exec playwright test --project=hmr-routes --project=hmr-resolver --workers=1
working-directory: packages/router
# Behavioural e2e specs. The config default (undefined => 50% of cores)
# only yields 2 workers on a 4-vCPU runner; these specs are I/O-bound, so
# we use all cores via '100%'.
# NOTE: temporarily chromium-only while we measure CI timing. Re-add
# `--project=firefox --project=webkit` to restore full browser coverage.
- name: Run e2e tests (parallel)
run: pnpm exec playwright test --project=chromium --workers=100%
working-directory: packages/router
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ !cancelled() }}
with:
name: playwright-report
path: packages/router/playwright-report/
retention-days: 30