-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (51 loc) · 1.57 KB
/
Makefile
File metadata and controls
63 lines (51 loc) · 1.57 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
.PHONY: all test lint build clean install dev help
# Default target
all: lint test
# Install dependencies
install:
composer install --no-dev
# Install with dev dependencies
dev:
composer install
# Run tests
test:
./vendor/bin/phpunit
# Run tests with coverage
test-coverage:
XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-html coverage/
@echo "Coverage report: coverage/index.html"
# Run linter
lint:
./vendor/bin/phpcs --standard=PSR12 src/ || true
@which phpstan > /dev/null && ./vendor/bin/phpstan analyse src --level=5 || true
# Fix lint issues
lint-fix:
./vendor/bin/phpcbf --standard=PSR12 src/ || true
# Security scan
security:
composer audit
# Validate composer.json
validate:
composer validate --strict
# Clean build artifacts
clean:
rm -rf vendor/ coverage/
rm -f composer.lock
# Run examples (requires IPTU_API_KEY)
examples:
@if [ -z "$(IPTU_API_KEY)" ]; then echo "IPTU_API_KEY is required"; exit 1; fi
php examples/basic.php
# Help
help:
@echo "Available targets:"
@echo " make install - Install dependencies (production)"
@echo " make dev - Install with dev dependencies"
@echo " make test - Run tests"
@echo " make test-coverage - Run tests with coverage"
@echo " make lint - Run linter"
@echo " make lint-fix - Fix lint issues"
@echo " make security - Run security scan"
@echo " make validate - Validate composer.json"
@echo " make clean - Clean build artifacts"
@echo " make examples - Run examples (requires IPTU_API_KEY)"
@echo " make help - Show this help"