Files
cv-site/Makefile
T

38 lines
1021 B
Makefile
Raw Normal View History

2025-11-20 14:01:03 +00:00
.PHONY: test test-all test-unit test-integration lint build
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
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!"