Files
vue-tui/.github/workflows/ci.yml
T
Yunfei He bdf06ddf1f fix(ci): bump Node to 22.18.0 for native TS config loading
Second CI run got past install but failed loading vite.config.ts: native TS
type-stripping (used by vite/oxlint to read .ts config) requires Node
^20.19.0 || >=22.18.0, and 22.13.0 is below that. 22.18.0 is the true floor —
it satisfies both pnpm (>=22.13) and TS config loading (>=22.18). Match
engines.node.
2026-05-29 16:54:13 +08:00

54 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 and lint start immediately, while check:type and the
# test suites wait on build (their consumers 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. On a cache miss this finishes in
# ~40s vs ~60s run serially. `vp run --last-details` (or the run summary)
# shows which sub-task failed when one does.
- name: Verify (vp run ci)
run: vp run ci