@@ -302,13 +302,22 @@ make test-coverage
302302go test -coverprofile=coverage.out ./...
303303go tool cover -html=coverage.out -o coverage.html
304304
305+ # Check coverage percentage
306+ go tool cover -func=coverage.out | grep total
307+
305308# Run specific package tests
306309go test -v ./internal/api/...
307310
308311# Run with verbose output
309312go test -v -run TestSearchParks ./internal/api/
310313```
311314
315+ ** Coverage Requirements:**
316+ - ** Minimum threshold** : 25% (enforced in CI to prevent regression)
317+ - ** Target coverage** : 70% (see Contributing section for roadmap)
318+ - CI will fail if coverage drops below the minimum threshold
319+ - Always check coverage locally before pushing: ` make test-coverage `
320+
312321### Run Locally (without Docker)
313322
314323``` bash
@@ -664,12 +673,37 @@ Contributions are welcome! Here's how you can help:
664673
665674### Development Guidelines
666675- Follow Go best practices and idioms
667- - Maintain test coverage above 70%
676+ - Maintain test coverage above minimum threshold (see coverage requirements below)
668677- Document exported functions and packages
669678- Update README for user-facing changes
670679- Keep commits atomic and well-described
671680- Review ` AGENTS.md ` for project conventions and patterns
672681
682+ ### Test Coverage Requirements
683+
684+ ** Current Status:**
685+ - ** Overall coverage** : ~ 25%
686+ - ** Minimum threshold** : 25% (enforced in CI)
687+ - ** Target coverage** : 70%
688+
689+ ** Coverage by Package:**
690+ - ` internal/config ` : 94.3% ✅
691+ - ` internal/cache ` : 45.7%
692+ - ` internal/api ` : 27.2%
693+ - ` internal/mcp ` : 0.0% ⚠️
694+ - ` pkg/util ` : 0.0% ⚠️
695+
696+ ** Roadmap to 70% Coverage:**
697+ 1 . ** Phase 1** (Target: ~ 50-60%): Add comprehensive handler tests for ` internal/mcp `
698+ 2 . ** Phase 2** (Target: ~ 60-70%): Add utility package tests for ` pkg/util `
699+ 3 . ** Phase 3** (Target: 70%+): Add integration tests and improve API client coverage
700+
701+ ** Before Submitting PRs:**
702+ - Check coverage locally: ` make test-coverage `
703+ - Ensure your changes don't decrease overall coverage
704+ - Add tests for new features and bug fixes
705+ - Aim for 70%+ coverage on new code
706+
673707### Code Review Process
674708- All PRs require review before merging
675709- CI checks must pass (automated via GitHub Actions)
0 commit comments