d3480dc285
Review follow-ups on PR #25: - package.json `ready`: run build BEFORE check:lint, matching the CI graph where ci:lint dependsOn ci:build. Type-aware lint rules need the built @vue-tui/runtime types; with lint before build, `vp run ready` on a fresh checkout (dist removed) could misreport lint. Verified `CI=true vp run ready` on a clean checkout now passes with 0 lint warnings. - vite.config.ts + ci.yml comments: corrected the stale claim that "fmt and lint run immediately alongside build" — only fmt has no build dependency; lint now waits on build too. Dropped the outdated "~40s vs ~60s" figure.
53 lines
2.1 KiB
YAML
53 lines
2.1 KiB
YAML
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/<n>/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
|