diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..63715a9 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,27 @@ +# 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