Skip to content

[1.5.2 Patch][P2] 增加 GitHub Actions CI 与仓库卫生门禁 #83

Description

@weidonglang

背景

当前 1.5.1 已有手动验证记录,但 1.5.2 Patch 涉及大量安全、更新、端口、MySQL、前端布局和仓库卫生修复。仅靠人工本地执行容易漏测。

修复目标

增加 GitHub Actions CI,对每次 push / PR 执行基础质量门禁。

建议 workflow

新增:

.github/workflows/ci.yml

执行:

cd tauri/src-tauri
cargo test --all-targets
cargo clippy --all-targets -- -D warnings

cd ..
npm ci
npm run build

cd ..
python scripts/check_safety_wording.py
python scripts/check_repo_hygiene.py

检查内容

  1. Rust 单元测试。
  2. Rust clippy。
  3. 前端 npm ci + build。
  4. 安全文案检查。
  5. 仓库卫生检查。
  6. update-manifest 解析检查。
  7. 如时间允许,增加 release checklist 校验。

缓存要求

可使用 actions/cache 缓存:

  • Cargo registry / target。
  • npm cache。

但不能缓存或上传构建产物中的敏感内容。

禁止事项

  • 不在 CI 中执行会修改系统环境的真实操作。
  • 不在 CI 中执行 MySQL 修复、分区扩容、Junction、服务注册等高危操作。
  • 不在 CI 中上传本地路径或用户数据。

验收标准

  • GitHub Actions 能正常运行。
  • PR / push 至少能执行 cargo test、clippy、npm build、repo hygiene。
  • CI 失败能明确指出原因。
  • README 增加 CI 状态说明,如需要。
  • docs/release-v1.5.2.md 记录 CI 引入。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions