前端此前无 CI。补 .gitea/workflows/ci.yml 跑 npm ci + npm run build(tsc -b && vite build)+ npm test,防前端回归(2026-06-24 架构评审 §10 验证体系)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28 lines
725 B
YAML
28 lines
725 B
YAML
# eip4-web CI(Gitea Actions)。
|
|
#
|
|
# P0 修复(2026-06-24 架构评审):eip4-web 此前无 CI。本工作流跑类型检查+构建+单测,
|
|
# 防前端回归(总览 §10 验证体系)。
|
|
#
|
|
# 前置条件:Gitea 实例需已启用 Actions 且注册了带 `ubuntu-latest` 标签的 act_runner。
|
|
name: ci
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: npm
|
|
- name: 安装依赖
|
|
run: npm ci
|
|
- name: 类型检查 + 构建(tsc -b && vite build)
|
|
run: npm run build
|
|
- name: 单测(vitest)
|
|
run: npm test
|