From b443d78d142dc6f21c8a6cdf458597921f4ff45b Mon Sep 17 00:00:00 2001 From: panxiao81 Date: Thu, 10 Sep 2026 06:25:08 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=B0=83=E6=95=B4=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E4=B8=8E=20CI=20=E9=AA=8C=E8=AF=81=E8=BE=B9=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 11 +++++++++-- CONTRIBUTING.md | 7 +++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 4ad5892..398b5e6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -105,9 +105,15 @@ make generate # Regenerate DeepCopy methods **After editing `*.go` files:** ``` make lint-fix # Auto-fix code style -make test # Run unit tests +make lint # Local verification; full tests run in PR CI ``` +Do not routinely run the full `make test` or Kind E2E suite during local agent +iteration. Keep local feedback fast with generation checks and `make lint`; after the +human approves opening the PR, rely on the configured self-hosted Gitea Actions jobs for +the complete test suite. Run a focused local test only when it is needed to diagnose a +specific failure or the user explicitly requests it. + ## CLI Commands Cheat Sheet ### Create API (your own types) @@ -182,7 +188,8 @@ kubebuilder create webhook \ ## Testing & Development ```bash -make test # Run unit tests (uses envtest: real K8s API + etcd) +make lint # Default local verification +make test # Full unit/envtest suite; normally run by PR CI make run # Run locally (uses current kubeconfig context) ``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 28e84be..e77bff7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,11 +43,14 @@ kubeconfig 或本地生成的二进制。 5. 提交前运行: ```sh - make test make lint - git diff --exit-code + git diff --check ``` + Agent 日常本地迭代不运行耗时的完整 `make test` 或 Kind E2E;生成一致性、Tests 和 E2E + 由获准创建 PR 后的 self-hosted Gitea Actions 执行。只有排查特定失败或人工明确要求时 + 才运行针对性的本地测试。 + 6. 达到一个小而完整、可独立 review 的边界时,先请求批准再创建 commit;一个 PR 可以包含多个这样的 commit。 7. 推送分支后,在创建 PR 前再次请求批准。PR 说明应包含规格链接、动机、行为变化、