033e2aa1fc
Provides easy commands for different test scenarios: - make test → Fast unit tests (CI-safe, no Chrome) - make test-all → ALL tests including PDF/Chrome integration - make test-integration → PDF tests only - make lint → Run golangci-lint - make check → Lint + unit tests - make all → Everything (lint + all tests + build)
38 lines
1021 B
Makefile
38 lines
1021 B
Makefile
.PHONY: test test-all test-unit test-integration lint build
|
|
|
|
# Default: Run unit tests only (fast, no Chrome needed)
|
|
test: test-unit
|
|
|
|
# Run unit tests only (CI-safe, no Chrome)
|
|
test-unit:
|
|
@echo "🧪 Running unit tests..."
|
|
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:
|
|
@echo "🧪 Running integration tests only..."
|
|
go test -v -race -tags=integration ./internal/handlers -run PDF
|
|
|
|
# Run linter
|
|
lint:
|
|
@echo "🔍 Running golangci-lint..."
|
|
golangci-lint run
|
|
|
|
# Build binary
|
|
build:
|
|
@echo "🔨 Building..."
|
|
go build -v -o cv-server .
|
|
|
|
# Run all checks (lint + unit tests)
|
|
check: lint test-unit
|
|
@echo "✅ All checks passed!"
|
|
|
|
# Run everything (lint + all tests + build)
|
|
all: lint test-all build
|
|
@echo "✅ Everything passed!"
|