name: CI on: pull_request: push: branches: [main] workflow_dispatch: # Cancel superseded PR runs, but never cancel a push-to-main run, so every # commit that lands on main gets a completed CI result. github.ref is unique # per PR (refs/pull//merge) and per branch (refs/heads/main). concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} # Least privilege: this job only builds, type-checks and tests — it never # deploys, releases or comments — so read-only contents (for checkout) is all # GITHUB_TOKEN needs. permissions: contents: read jobs: ci: name: Check, build & test runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 # voidzero-dev/setup-vp installs Node (via `vp env use`), the vp CLI, and # — because run-install defaults to true — runs `vp install` in the repo # root, so no separate install step is needed. # node-version "22.18.0" is the lowest Node that satisfies the whole # toolchain: pnpm@11 needs >=22.13, and loading the .ts config files # (native TS type-stripping, used by vite/oxlint) needs >=22.18.0. # 22.18.0 is the real supported floor; engines.node matches. # cache (off by default) caches the pnpm store; auto-detects pnpm-lock.yaml. - name: Set up Vite+ (vp) and Node uses: voidzero-dev/setup-vp@v1 with: node-version: "22.18.0" cache: true # `ci` is the parallel verification graph defined in vite.config.ts # (run.tasks). The vp task runner fans out independent branches # concurrently — fmt starts immediately, while lint, check:type, and the # test suites wait on build (the type-aware lint rules and the tests # resolve @vue-tui/runtime from the built dist) — so the wall-clock # critical path is build -> test:pty rather than the sum of every check. # `vp run --last-details` (or the run summary) shows which sub-task failed. - name: Verify (vp run ci) run: vp run ci