-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathMakefile.test
More file actions
49 lines (39 loc) · 1.79 KB
/
Copy pathMakefile.test
File metadata and controls
49 lines (39 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Fern Platform - Testing Makefile
# Handles all testing workflows using Dagger where appropriate
.PHONY: test test-unit test-acceptance test-playwright test-performance coverage fmt lint vet
# Test targets
test: test-unit ## Run unit tests (default)
test-unit: ## Run unit tests (excluding e2e tests)
@echo "🧪 Running unit tests..."
go run github.com/onsi/ginkgo/v2/ginkgo -v -race --cover --coverprofile=coverage.out --label-filter="!e2e" ./...
@echo "✅ Unit tests completed"
test-acceptance: ## Run acceptance tests (e2e labeled tests)
@echo "🧪 Running acceptance tests..."
go run github.com/onsi/ginkgo/v2/ginkgo -v --label-filter="e2e" ./...
@echo "✅ Acceptance tests completed"
test-playwright: ## Run Playwright tests via Dagger (no k8s required)
@echo "🧪 Running Playwright tests via Dagger..."
cd ci && dagger call acceptance-test-playwright --source=..
@echo "✅ Playwright tests completed"
test-performance: ## Run GraphQL performance regression tests
@echo "🧪 Running performance tests..."
@echo "Note: Requires test data. Run './scripts/insert-test-data.sh' if not already done."
cd acceptance && go run github.com/onsi/ginkgo/v2/ginkgo -v --label-filter="performance" ./performance
@echo "✅ Performance tests completed"
coverage: test-unit ## Generate test coverage report
@echo "📊 Generating coverage report..."
go tool cover -html=coverage.out -o coverage.html
@echo "✅ Coverage report generated: coverage.html"
# Code quality
fmt: ## Format Go code
@echo "🎨 Formatting Go code..."
go fmt ./...
@echo "✅ Code formatted"
lint: ## Run Go linting via Dagger
@echo "🔍 Running linting via Dagger..."
cd ci && dagger call lint --source=..
@echo "✅ Linting completed"
vet: ## Run Go vet
@echo "🔍 Running go vet..."
go vet ./...
@echo "✅ Go vet completed"