Skip to content

chore(ci): 合并后不再重跑测试 - #287

Merged
SheathedSharp merged 2 commits into
mainfrom
chore/ci-gate-before-merge
Nov 12, 2026
Merged

SheathedSharp merged 2 commits into
mainfrom
chore/ci-gate-before-merge

Conversation

@SheathedSharp

Copy link
Copy Markdown
Owner

为什么

main 上现在每次合并都会把 Engine / Windows / Git read / Examples / Readiness 再跑一遍。
这趟不设任何门槛:strict_required_status_checks_policy 要求 PR 头包含最新 main,
用 merge commit 合并时合并提交的树就是刚刚通过检查的那棵树。重复跑只制造噪音。

改了什么

  • engine.yml、windows.yml、git-read.yml、examples.yml、readiness.yml 删除
    push: branches: [main],保留 workflow_dispatch。
  • 保留 release.yml(tag 触发)、nightly.yml(每日全量)、site.yml(push 到 main 是
    GitHub Pages 部署)、ci-config.yml(需要在 settings 变更后校验线上 ruleset)。
  • docs/agent/validation.md、develop.md、releasing.md 同步说明新的覆盖模型。

配套的仓库设置(不在本 PR 内)

同一个变更还包含两项仓库设置,合并前应用:

  • ruleset 增加 Require a pull request before merging(0 个批准,允许作者自合并),
    并把允许的合并方式限定为 merge commit。这是删掉 push 触发器的前提:直推 main 现在
    会被拒绝,否则直推就没有任何 CI 覆盖。
  • 打开 delete_branch_on_merge。

实际执行的验证

$ python3 scripts/check_ci_gate.py
quality gate: 13 required checks match workflows

$ python3 scripts/check_docs.py
documentation: 6 pair(s) consistent

$ ruby -ryaml -e "YAML.load_file(...)"   # 12 个 workflow 文件全部可解析

未跑:actionlint 本地未安装;工作流的真实执行由本 PR 自己的检查覆盖。

🤖 Generated with Claude Code

SheathedSharp and others added 2 commits November 12, 2026 13:45
main 只接受 PR 合并,strict 策略保证 PR 头包含最新 main,合并提交的树就是
刚刚通过检查的树;push 到 main 再跑一遍不设任何门槛。nightly 与 release tag
仍是完整门槛。

Co-Authored-By: Claude Code <noreply@anthropic.com>
补充合并提交复用 PR 结果的依据,并说明 CI configuration 为什么保留 push 触发。

Co-Authored-By: Claude Code <noreply@anthropic.com>
@SheathedSharp
SheathedSharp merged commit 0d61d73 into main Nov 12, 2026
13 checks passed
@SheathedSharp
SheathedSharp deleted the chore/ci-gate-before-merge branch November 12, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant