Files
cv-site/Makefile
T

53 lines
1.4 KiB
Makefile
Raw Normal View History

.PHONY: test test-all test-unit test-integration lint build dev run clean
2025-10-20 08:54:21 +01:00
2025-11-20 14:01:03 +00:00
# Default: Run unit tests only (fast, no Chrome needed)
test: test-unit
2025-10-20 08:54:21 +01:00
2025-11-20 14:01:03 +00:00
# Run unit tests only (CI-safe, no Chrome)
test-unit:
@echo "🧪 Running unit tests..."
2025-11-20 14:01:03 +00:00
go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
# Run ALL tests including PDF/Chrome integration tests
test-all:
@echo "🧪 Running ALL tests (including integration tests)..."
go test -v -race -tags=integration -coverprofile=coverage.txt -covermode=atomic ./...
# Run integration tests only
test-integration:
2025-11-20 14:01:03 +00:00
@echo "🧪 Running integration tests only..."
go test -v -race -tags=integration ./internal/handlers -run PDF
2025-11-20 14:01:03 +00:00
# Run linter
lint:
@echo "🔍 Running golangci-lint..."
golangci-lint run
2025-11-20 14:01:03 +00:00
# Build binary
build:
@echo "🔨 Building..."
go build -v -o cv-server .
2025-10-30 12:19:57 +00:00
# Run in development mode with hot reload
dev:
@echo "🚀 Starting development server with hot reload..."
GO_ENV=development TEMPLATE_HOT_RELOAD=true go run main.go
# Run in production mode
run:
@echo "🚀 Starting server..."
go run main.go
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
rm -f cv-server coverage.txt coverage-report.txt benchmark.txt
2025-11-20 14:01:03 +00:00
# Run all checks (lint + unit tests)
check: lint test-unit
@echo "✅ All checks passed!"
2025-10-30 12:19:57 +00:00
2025-11-20 14:01:03 +00:00
# Run everything (lint + all tests + build)
all: lint test-all build
@echo "✅ Everything passed!"