mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-03 05:20:01 +00:00
build(ci): add coverage ratchet gate with per-package floors
Add automated coverage floor validation: - scripts/check_coverage.go: parses coverage.out, compares to per-package thresholds, supports --update to lock current floors - scripts/coverage_thresholds.json: 61 packages, initial floors from Phase 1 - .github/workflows/ci.yaml: new 'Coverage ratchet gate' step in CI - internal/testutil/: test utilities (context builders, TestDB, doc.go)
This commit is contained in:
1 parent
eb2419beed
commit
27c9415193
7 files changed
+463
-1
No files matched your search
@@ -21,9 +21,11 @@ jobs:
|
||||
- run: go build ./...
|
||||
- run: go build -tags sqliteonly ./...
|
||||
- run: go vet ./...
|
||||
- run: go test -race -coverprofile=coverage.out ./...
|
||||
- run: go test -race -coverpkg=./... -coverprofile=coverage.out ./...
|
||||
- name: Coverage summary
|
||||
run: go tool cover -func=coverage.out | tail -1
|
||||
- name: Coverage ratchet gate
|
||||
run: go run scripts/check_coverage.go -coverprofile=coverage.out
|
||||
|
||||
web:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in new issue
Block a user