-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (68 loc) · 2.55 KB
/
Makefile
File metadata and controls
89 lines (68 loc) · 2.55 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Makefile for Flutter Test Pilot
.PHONY: help test test-unit test-integration test-comprehensive test-all coverage clean format lint analyze
help: ## Show this help message
@echo "Flutter Test Pilot - Make Commands"
@echo "=================================="
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
test: ## Run unit tests (default)
@echo "🧪 Running unit tests..."
@flutter test
test-unit: ## Run only unit tests
@echo "🧪 Running unit tests..."
@flutter test test/unit/
test-integration: ## Run integration tests (requires device)
@echo "🧪 Running integration tests..."
@cd example && flutter test integration_test/
test-comprehensive: ## Run comprehensive manual tests
@echo "🧪 Running comprehensive tests..."
@dart test/comprehensive_test.dart
test-all: ## Run all tests (unit + integration + comprehensive)
@echo "🧪 Running all tests..."
@./test_runner.sh --all
coverage: ## Generate test coverage report
@echo "📊 Generating coverage report..."
@flutter test --coverage
@if command -v lcov >/dev/null 2>&1; then \
genhtml coverage/lcov.info -o coverage/html; \
echo "✅ Coverage report generated at coverage/html/index.html"; \
else \
echo "⚠️ Install lcov to generate HTML report: brew install lcov (Mac) or sudo apt-get install lcov (Linux)"; \
fi
clean: ## Clean build artifacts and cache
@echo "🧹 Cleaning..."
@flutter clean
@rm -rf build/
@rm -rf coverage/
@cd example && flutter clean
format: ## Format all Dart files
@echo "✨ Formatting code..."
@dart format .
lint: ## Run linter
@echo "🔍 Running linter..."
@flutter analyze
analyze: ## Run static analysis
@echo "🔍 Running static analysis..."
@flutter analyze --fatal-infos
fix: ## Apply automated fixes
@echo "🔧 Applying fixes..."
@dart fix --apply
get: ## Get dependencies
@echo "📦 Getting dependencies..."
@flutter pub get
upgrade: ## Upgrade dependencies
@echo "⬆️ Upgrading dependencies..."
@flutter pub upgrade
build-example: ## Build example app
@echo "🏗️ Building example app..."
@cd example && flutter build apk
install: ## Install CLI globally
@echo "📥 Installing CLI..."
@dart pub global activate --source path .
run-example: ## Run example app
@echo "🚀 Running example app..."
@cd example && flutter run
check: format lint test ## Run format, lint, and tests
@echo "✅ All checks passed!"
ci: clean get analyze test ## CI pipeline (clean, get, analyze, test)
@echo "✅ CI checks completed!"
.DEFAULT_GOAL := help