feat(testing): add unified quality gates and coverage baseline

This commit is contained in:
phamnazage-jpg
2026-05-30 15:28:32 +08:00
parent 347389c0a2
commit 61a5a36c58
6 changed files with 354 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
- 例如:
- `test_real_host_scripts.sh`
- `test_tksea_portal_assets.sh`
- `verify_quality_gates.sh`
## 放置规则
@@ -38,6 +39,20 @@
```bash
bash ./scripts/test/test_real_host_scripts.sh
bash ./scripts/test/test_tksea_portal_assets.sh
bash ./scripts/test/verify_quality_gates.sh
scripts/deploy/build_local_image.sh
bash ./scripts/acceptance/real_host_acceptance.sh
```
## 统一质量门禁
`scripts/test/verify_quality_gates.sh` 是当前推荐的一键测试入口,职责是:
- 统一执行:
- `gofmt -l .`
- `go vet ./...`
- `go test -cover ./internal/...`
- `go test ./tests/integration/... -count=1`
- 读取 `tests/quality/coverage_thresholds.tsv`
- 输出 coverage gate 报告到临时目录
- 对 core 包覆盖率做硬门槛,对 watch 包做显式告警