|
1 | 1 | # VoidRunner Makefile |
2 | 2 | # Provides standardized commands for building, testing, and running the application |
3 | 3 |
|
4 | | -.PHONY: help test test-fast test-integration test-all build run dev clean coverage coverage-check coverage-check-threshold docs docs-serve lint fmt vet security deps deps-update migrate-up migrate-down migrate-reset migration docker-build docker-run clean-docs install-tools setup dev-setup all pre-commit bench db-start db-stop db-reset |
| 4 | +.PHONY: help test test-fast test-integration test-all build run dev clean coverage coverage-check docs docs-serve lint fmt vet security deps deps-update migrate-up migrate-down migrate-reset migration docker-build docker-run clean-docs install-tools setup all pre-commit bench db-start db-stop db-reset |
5 | 5 |
|
6 | 6 | # Default target |
7 | 7 | help: ## Show this help message |
@@ -65,10 +65,6 @@ coverage-check: ## Check if coverage meets minimum threshold (80%) |
65 | 65 | @go tool cover -func=coverage.out |
66 | 66 | @./scripts/check-coverage.sh coverage.out 80.0 |
67 | 67 |
|
68 | | -coverage-check-threshold: ## Check coverage with custom threshold (usage: make coverage-check-threshold THRESHOLD=85) |
69 | | - @echo "Checking coverage threshold: $(THRESHOLD)% (excluding integration tests)" |
70 | | - @go test -v -race -coverprofile=coverage.out ./cmd/... ./internal/... ./pkg/... |
71 | | - @./scripts/check-coverage.sh coverage.out $(THRESHOLD) |
72 | 68 |
|
73 | 69 | # Development targets |
74 | 70 | run: build ## Run the API server locally |
@@ -200,26 +196,22 @@ install-tools: ## Install development tools |
200 | 196 | setup: deps install-tools ## Setup development environment |
201 | 197 | @echo "Setting up development environment..." |
202 | 198 | @cp .env.example .env || echo ".env.example not found, skipping" |
203 | | - @echo "Development environment setup complete" |
204 | | - @echo "Edit .env file with your configuration" |
205 | | - |
206 | | -# Performance testing |
207 | | -bench: ## Run benchmark tests |
208 | | - @echo "Running benchmark tests..." |
209 | | - @go test -bench=. -benchmem ./... |
210 | | - |
211 | | -# All-in-one development commands |
212 | | -dev-setup: setup ## Complete development setup |
213 | | - @echo "Development setup completed" |
214 | | - @echo "✅ Ready for development!" |
| 199 | + @echo "✅ Development environment setup complete!" |
215 | 200 | @echo " - Tools: installed" |
216 | 201 | @echo " - Dependencies: downloaded" |
| 202 | + @echo " - .env file: created (edit with your configuration)" |
217 | 203 | @echo "" |
218 | 204 | @echo "To run integration tests:" |
219 | 205 | @echo " make db-start # Start test database" |
220 | 206 | @echo " make test-integration # Run integration tests" |
221 | 207 | @echo " make db-stop # Stop test database (optional)" |
222 | 208 |
|
| 209 | +# Performance testing |
| 210 | +bench: ## Run benchmark tests |
| 211 | + @echo "Running benchmark tests..." |
| 212 | + @go test -bench=. -benchmem ./... |
| 213 | + |
| 214 | + |
223 | 215 | all: clean deps lint test build ## Run all quality checks and build |
224 | 216 |
|
225 | 217 | # Precommit hook |
|
0 commit comments