chore(ci): CI 校验迁本地(ci/check-local.sh),删 pipeline ci.yml

ci.yml 跑在自建 gitea 的 mac-pangolin-2 runner 上,该 runner 不稳:重 job
(go/flutter/golden/integration/e2e)频繁整体超时/失败(run 233、236 复现:所有
runs-on=mac 的 job 全挂、runs-on=ubuntu 的 nas 快扫描全过,证明是 mac runner
掉线而非代码)。既然开发就在 mac 上、原生工具齐全,把校验迁回本地。

- 新增 ci/check-local.sh:与 ci.yml 各 job 一一对应,dev mac 原生跑(仅 golden
  因 Linux 权威基线走 docker)。分档:默认=静态闸+go build/test+flutter analyze/test
  (各带覆盖率闸 Go30%/Flutter28%);--full 加 golden/go-integration/e2e;
  --only <名> 单跑;--list 列项。缺工具标 SKIP 不算失败。shellcheck-clean。
- 删 .gitea/workflows/ci.yml(部署流水线 deploy-server/client/site 保留,发版
  仍过 go test)。
- .githooks/pre-commit:秒级快闸不变,指引改指 ci/check-local.sh(原指 CI)。
- CLAUDE.md CI/CD 段重写 + ds-flow 闸表「CI」触发点改「check-local」。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A79VtQA1BwTuQN1ThpvYpo
This commit was merged in pull request #8.
This commit is contained in:
wangjia
2026-08-01 10:20:18 +08:00
parent 9aafb63461
commit b255fdfb4e
4 changed files with 189 additions and 282 deletions
+3 -2
View File
@@ -2,7 +2,8 @@
# .githooks/pre-commit — 闸 3:提交前本地把关(复用 CI 同款检查的快子集)。
#
# 启用:bash ci/install-hooks.sh (设 git core.hooksPath=.githooks)
# 设计:成功静默、失败才打详情;只放秒级检查。flutter/go test 较慢,留给 CI(闸 4)。
# 设计:成功静默、失败才打详情;只放秒级检查。flutter/go test 较慢,不放这里 ——
# 提交/发版前手动跑 `bash ci/check-local.sh`(取代已删的 pipeline ci.yml)。
#
# 跑:红线词扫描 + 可移植 SQL 扫描 + codegen 漂移检查。
set -euo pipefail
@@ -48,4 +49,4 @@ if command -v node >/dev/null 2>&1; then
fi
fi
echo "[pre-commit] ✓ 本地闸通过(完整测试见 CI)"
echo "[pre-commit] ✓ 本地闸通过(完整校验跑 bash ci/check-local.sh)"