test: add tests for handler, email, cmd/server, version and enforce 80% coverage

This commit is contained in:
2026-07-26 20:59:56 +02:00
parent 08554695da
commit 4dd7b6991d
8 changed files with 1295 additions and 6 deletions
+5
View File
@@ -49,6 +49,11 @@ jobs:
- name: go test -race
run: go test -race -count=1 ./...
- name: Check coverage threshold
run: |
go test -coverprofile=coverage.out ./internal/... ./pkg/...
go tool cover -func=coverage.out | grep '^total:' | python3 -c "import sys; pct=float(sys.stdin.read().split()[2].rstrip('%')); sys.exit(0 if pct >= 80 else 1)" || (echo "ERROR: coverage < 80%"; exit 1)
- name: go test ./examples
run: go build ./examples/...