diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6aba44a..66da195 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,9 +52,6 @@ jobs: cache: pnpm cache-dependency-path: frontend/pnpm-lock.yaml - - name: Test GitHub automation scripts - run: node --test ".github/scripts/*.test.mjs" - - name: Verify CHANGELOG.md matches current version shell: pwsh run: | diff --git a/.github/workflows/code-diagnosis.yml b/.github/workflows/code-diagnosis.yml index 92a9aa9..57e1b96 100644 --- a/.github/workflows/code-diagnosis.yml +++ b/.github/workflows/code-diagnosis.yml @@ -66,4 +66,4 @@ jobs: PR_REVIEW_LLM_MODEL: ${{ vars.PR_REVIEW_LLM_MODEL || 'glm-5.4' }} PR_REVIEW_LLM_PROTOCOL: ${{ vars.PR_REVIEW_LLM_PROTOCOL || 'anthropic' }} PR_REVIEW_LLM_EXTRA_BODY: ${{ vars.PR_REVIEW_LLM_EXTRA_BODY }} - run: node .github/scripts/code-diagnosis.mjs + run: node scripts/ci/code-diagnosis.mjs diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index a554556..19ed032 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -34,7 +34,7 @@ jobs: ref: ${{ github.workflow_sha }} persist-credentials: false sparse-checkout-cone-mode: false - sparse-checkout: /.github/scripts/ + sparse-checkout: /scripts/ci/ - name: Triage issue env: GITHUB_TOKEN: ${{ github.token }} @@ -43,4 +43,4 @@ jobs: PR_REVIEW_LLM_MODEL: ${{ vars.PR_REVIEW_LLM_MODEL || 'glm-5.3-flash' }} PR_REVIEW_LLM_PROTOCOL: ${{ vars.PR_REVIEW_LLM_PROTOCOL || 'anthropic' }} PR_REVIEW_LLM_EXTRA_BODY: ${{ vars.PR_REVIEW_LLM_EXTRA_BODY }} - run: node .github/scripts/issue-triage.mjs + run: node scripts/ci/issue-triage.mjs diff --git a/.github/workflows/pr-model.yml b/.github/workflows/pr-model.yml index 9c27b3d..a6a7b02 100644 --- a/.github/workflows/pr-model.yml +++ b/.github/workflows/pr-model.yml @@ -20,8 +20,8 @@ jobs: ref: ${{ github.workflow_sha }} persist-credentials: false sparse-checkout-cone-mode: false - sparse-checkout: /.github/scripts/pr-model.mjs + sparse-checkout: /scripts/ci/pr-model.mjs - name: Check the model and coding tool declarations env: GITHUB_TOKEN: ${{ github.token }} - run: node .github/scripts/pr-model.mjs + run: node scripts/ci/pr-model.mjs diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index a0ff81c..6c911b9 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -46,8 +46,8 @@ jobs: persist-credentials: false sparse-checkout-cone-mode: false sparse-checkout: | - /.github/scripts/pr-review.mjs - /.github/scripts/pr-review-language.mjs + /scripts/ci/pr-review.mjs + /scripts/ci/pr-review-language.mjs /.opencodereview/rule.json /docs/pr-review-guidelines.md /docs/design-guidelines.md @@ -108,4 +108,4 @@ jobs: PR_REVIEW_STATE_DIR: ${{ runner.temp }}/pr-review-state/sessions PR_REVIEW_SESSION_HOME: ${{ runner.temp }}/pr-review-state/sessions PR_REVIEW_REUSE_INCOMPLETE: "true" - run: node .github/scripts/pr-review.mjs + run: node scripts/ci/pr-review.mjs diff --git a/docs/testing.md b/docs/testing.md index 8a4a4ad..c194e2f 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -8,7 +8,8 @@ | 改动前端 | `node scripts/test.mjs quick frontend` | 界面逻辑、国际化、架构约束和静态检查 | | 改动持久化或升级 | `node scripts/test.mjs quick storage` | 配置和数据目录、迁移及插件状态存储,使用真实临时文件 | | 改动调试工具 | `node scripts/test.mjs quick tooling` | 临时目录和工单工具自测 | -| 跨模块改动或提 PR | `node scripts/test.mjs ci` | 前端测试和类型检查、`cmd/`、`internal/`、`pkg/`、`scripts/` 下的 Go 测试与 vet、调试工具自测 | +| 改动 GitHub 自动化脚本 | `node scripts/test.mjs quick automation` | `scripts/ci/` 下 PR 审核、Issue 分诊、代码诊断和申报校验脚本的自测 | +| 跨模块改动或提 PR | `node scripts/test.mjs ci` | 前端测试和类型检查、`cmd/`、`internal/`、`pkg/`、`scripts/` 下的 Go 测试与 vet、调试工具自测、GitHub 自动化脚本自测 | | 核对发布候选 | `node scripts/test.mjs release` | 使用 `desktop,production` 构建标签运行同一套 Go 检查,禁用测试结果缓存并随机化用例顺序 | | Windows 桌面冒烟 | `node scripts/test.mjs webview2 build/bin/reims-go.exe` | 启动已构建的客户端,在真实 WebView2 中完成首启数据目录设置 | diff --git a/.github/scripts/code-diagnosis.mjs b/scripts/ci/code-diagnosis.mjs similarity index 99% rename from .github/scripts/code-diagnosis.mjs rename to scripts/ci/code-diagnosis.mjs index ab87ab8..01a51b6 100644 --- a/.github/scripts/code-diagnosis.mjs +++ b/scripts/ci/code-diagnosis.mjs @@ -18,7 +18,7 @@ export const AREAS = [ ]; const MARKER = "