mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 08:14:55 +08:00
fix(repo):统一发布健康与只读质量门禁
This commit is contained in:
+10
-16
@@ -36,7 +36,7 @@ cargo clippy --version
|
||||
go version
|
||||
```
|
||||
|
||||
该 workflow 会用 `GITHUB_SERVER_URL`、`GITHUB_REPOSITORY`、`GITHUB_REF` 和 `GITHUB_SHA` 手动 `git fetch` 当前提交,再执行 Rust workspace 的格式化、检查、构建、clippy 和测试,以及 Go API 门禁和文档状态门禁。这样可以避免自托管 runner 在准备阶段通过代理克隆第三方 action 仓库。
|
||||
该 workflow 会用 `GITHUB_SERVER_URL`、`GITHUB_REPOSITORY`、`GITHUB_REF` 和 `GITHUB_SHA` 手动 `git fetch` 当前提交,再执行 Rust workspace 的只读格式检查、检查、构建、clippy 和测试,以及 Go API 格式、测试、vet、构建、可选 lint 和文档状态门禁。这样可以避免自托管 runner 在准备阶段通过代理克隆第三方 action 仓库。
|
||||
|
||||
#### Docker
|
||||
```bash
|
||||
@@ -66,14 +66,11 @@ git checkout -b feature/your-feature-name
|
||||
### 2. 开发
|
||||
|
||||
```bash
|
||||
# 实时编译检查
|
||||
make check
|
||||
# 运行只读 required 门禁(不会格式化或修改源码)
|
||||
make ci-check
|
||||
|
||||
# 运行测试
|
||||
make test
|
||||
|
||||
# 格式化代码
|
||||
make fmt
|
||||
# 需要格式化时才修改工作树
|
||||
make format
|
||||
```
|
||||
|
||||
开发约束:
|
||||
@@ -143,20 +140,17 @@ UnityFS / AssetBundle / Addressables / TypeTree 解析当前按路线图继续
|
||||
### 合并前通用门禁
|
||||
|
||||
```bash
|
||||
cargo fmt --all -- --check
|
||||
cargo test --workspace
|
||||
cargo clippy --workspace --all-targets -- -D warnings
|
||||
make test-go-api
|
||||
make build-go-api
|
||||
go vet ./internal/api/... ./internal/backendrpc/... ./cmd/bat-api/...
|
||||
make check-docs
|
||||
make ci-check
|
||||
```
|
||||
|
||||
`make ci-check` 是只读门禁入口;`make format` / `make fmt` 才会修改源码。缺少
|
||||
`golangci-lint` 时,Go lint 作为 optional gate 明确输出 skipped,不会伪报全部门禁通过。
|
||||
|
||||
Go 边界与进度以 `docs/reports/GO_STATUS.md` 为准:
|
||||
|
||||
- **同步/运维命令行** = Rust `bat`(近乎全自动)
|
||||
- **资源 bootstrap/分发服务与内嵌 dashboard** = `cmd/bat-api`(`make build-go-api`)
|
||||
- **默认 Go 门禁** = `make test-go-api`(无 FFI)
|
||||
- **默认 Go 门禁** = `make ci-check` 中的纯 Go API test/vet/build(无 FFI)
|
||||
- 试验 CLI 产物为 `bin/bat-go`(`make build-go-cli`),**禁止**与 Rust `bat` 重名
|
||||
- 修改 FFI 时再跑 `make test-go-ffi`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user