Tests
This commit is contained in:
49
Makefile
49
Makefile
@ -47,9 +47,46 @@ clean:
|
||||
.PHONY: test
|
||||
test:
|
||||
@echo "Running tests..."
|
||||
@go test ./...
|
||||
@echo "✓ Tests passed"
|
||||
|
||||
|
||||
.PHONY: test-verbose
|
||||
test-verbose:
|
||||
@echo "Running tests (verbose)..."
|
||||
@go test -v ./...
|
||||
|
||||
|
||||
.PHONY: test-coverage
|
||||
test-coverage:
|
||||
@echo "Running tests with coverage..."
|
||||
@go test -cover ./...
|
||||
@echo "✓ Tests completed"
|
||||
|
||||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
@echo "Generating coverage report..."
|
||||
@go test -coverprofile=coverage.out ./...
|
||||
@go tool cover -html=coverage.out -o coverage.html
|
||||
@echo "✓ Coverage report generated: coverage.html"
|
||||
@echo " Open coverage.html in your browser to view detailed coverage"
|
||||
|
||||
|
||||
.PHONY: test-short
|
||||
test-short:
|
||||
@echo "Running short tests..."
|
||||
@go test -short ./...
|
||||
@echo "✓ Short tests passed"
|
||||
|
||||
|
||||
.PHONY: bench
|
||||
bench:
|
||||
@echo "Running benchmarks..."
|
||||
@go test -bench=. -benchmem ./internal/naming
|
||||
@echo "✓ Benchmarks completed"
|
||||
|
||||
|
||||
.PHONY: verify-static
|
||||
verify-static: build
|
||||
@echo "Verifying binary is statically linked..."
|
||||
@ -69,12 +106,22 @@ upgrade-packages:
|
||||
help:
|
||||
@echo "Entity Maker - Makefile targets:"
|
||||
@echo ""
|
||||
@echo "Build targets:"
|
||||
@echo " build Build static binary for Linux (default)"
|
||||
@echo " build-dev Build development binary with debug symbols"
|
||||
@echo " install Install binary to /usr/local/bin"
|
||||
@echo " clean Remove build artifacts"
|
||||
@echo " test Run tests"
|
||||
@echo " verify-static Verify binary has no dynamic dependencies"
|
||||
@echo ""
|
||||
@echo "Test targets:"
|
||||
@echo " test Run all tests"
|
||||
@echo " test-verbose Run tests with verbose output"
|
||||
@echo " test-coverage Run tests and show coverage summary"
|
||||
@echo " coverage Generate HTML coverage report"
|
||||
@echo " test-short Run only short tests"
|
||||
@echo " bench Run benchmarks"
|
||||
@echo ""
|
||||
@echo "Other targets:"
|
||||
@echo " upgrade-packages Update Go dependencies"
|
||||
@echo " help Show this help message"
|
||||
@echo ""
|
||||
|
||||
Reference in New Issue
Block a user