Files
jiu/.gitea/workflows/checks.yml
T
wangjia 21a4a8cab7 ci: 补三道缺口闸——CI 强制 flutter test + SSR 模板 token 同源 + 徽章图标映射同集
- checks.yml 加 flutter test(DoD 写了但此前无闸,golden 回归全靠自觉;
  本地 /release client 门禁同步加了 flutter test,该文件 gitignore 不入库)
- check-l1-sync ⑤:backend 公开页模板内联 token 值须与原型 tokens.css
  对应主题块一致(模板自包含手拷值,此前仅注释约定零校验;已注入漂移自证)
- check-l1-sync ⑥:BADGE_ICON ↔ kStatusIcons 状态词同集(此前两端手工转录)
- 顺修 gen_tokens 旧路径注释(client/lib/core/theme/tool/ → client/tool/)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JJ1g8XV1YhhmHRzhwWEW7o
2026-07-07 18:24:34 +08:00

46 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Design Source Checks
# 设计真相源检查(治理规则见 CLAUDE.md「设计真相源分层」):
# PR 与合并 main 时自动跑:四道静态闸(node + dart format+ flutter test
# (单测 + golden ×3 主题回归自比,2026-07-07 纳入——此前 DoD 写了但无闸)。
# fidelity 重型像素闸维持「定期体检」定位,本地手动跑。
on:
pull_request:
push:
branches: [main]
concurrency:
group: checks-${{ gitea.ref }}
cancel-in-progress: true
jobs:
design-source:
runs-on: mac
steps:
- uses: actions/checkout@v4
- name: Provision (idempotent — auto-runs if host not initialized)
run: sh scripts/ci/provision-mac.sh
- name: 原型设计系统闸(check-ds 12 道)
run: node .superpowers/prototype/tools/check-ds.mjs
- name: L1 真相源同源闸(tokens 快照 / icons / 官网 token 值 / web hex
run: node tools/check-l1-sync.mjs
- name: Flutter 颜色单源闸(check_ds_code
run: node client/tool/check_ds_code.mjs
- name: token codegen 新鲜度(regen → format → 与入库产物零 diff
run: |
cd client
node tool/gen_tokens.mjs
dart format lib/core/theme/app_tokens.g.dart lib/core/theme/app_dims.g.dart lib/core/theme/app_chrome.g.dart
git diff --exit-code -- lib/core/theme/app_tokens.g.dart lib/core/theme/app_dims.g.dart lib/core/theme/app_chrome.g.dart
- name: Flutter 测试(单测 + golden ×3 主题回归自比)
run: |
cd client
flutter test