-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
90 lines (62 loc) · 2.15 KB
/
Makefile
File metadata and controls
90 lines (62 loc) · 2.15 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
90
.PHONY: help check fix lint format typecheck test test-quick coverage build notify clean install test-setup test-cleanup test-web test-e2e
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# === Setup ===
install: ## Install dependencies
npm install
setup: install ## Full setup (install + git hooks)
./scripts/setup-hooks.sh
# === Quality ===
lint: ## Run linter
npx eslint src/ tests/
format: ## Format code
npx prettier --write 'src/**/*.ts' 'tests/**/*.ts'
fix: ## Auto-fix lint issues and format
npx eslint src/ tests/ --fix
npx prettier --write 'src/**/*.ts' 'tests/**/*.ts'
typecheck: ## Run type checker
npx tsc --noEmit
check: lint typecheck test ## Run lint + types + tests
gate: ## Full gate: format + lint + types + tests + build (pre-push)
npx prettier --check 'src/**/*.ts' 'tests/**/*.ts'
npx eslint src/ tests/
npx vitest run
npx tsc && cd src/dashboard/frontend && npm run build
# === Build ===
build: ## Build TypeScript
npx tsc
dev: ## Run in dev mode
npx tsx src/index.ts
# === Testing ===
test: ## Run all tests
npx vitest run
test-quick: ## Run tests with fast fail
npx vitest run --bail 1
test-watch: ## Run tests in watch mode
npx vitest
coverage: ## Run tests with coverage report
npx vitest run --coverage
# === Notifications ===
notify: ## Send notification (MSG="your message")
@if [ -n "$$NTFY_TOPIC" ]; then \
curl -s -H "Title: $(or $(TITLE),Project Notification)" \
-d "$(or $(MSG),Task completed)" \
ntfy.sh/$$NTFY_TOPIC; \
echo ""; \
else \
echo "NTFY_TOPIC not set. Run: export NTFY_TOPIC=your-topic"; \
fi
# === Cleanup ===
clean: ## Remove build artifacts
rm -rf dist/
rm -rf coverage/ .vitest/
# === Test Sprint Runner ===
test-setup: ## Create test issues and milestones
./scripts/test-setup.sh
test-cleanup: ## Remove all test sprint artifacts
./scripts/test-cleanup.sh
test-web: ## Run web dashboard in test mode
npx tsx src/index.ts web --config .aiscrum/config.test.yaml
test-e2e: ## Run Playwright E2E tests (requires test-setup first)
npx playwright test --reporter=list