forked from fzaninotto/Faker
-
Notifications
You must be signed in to change notification settings - Fork 353
/
Makefile
44 lines (34 loc) · 1.33 KB
/
Makefile
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
.PHONY: build
build: cs static test ## Runs cs, static, and test targets
# https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
always:
.PHONY: help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: cs
cs: vendor ## Fixes coding standard issues with php-cs-fixer
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --diff --show-progress=dots --verbose
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.test.php --diff --show-progress=dots --verbose
.PHONY: coverage
coverage: vendor ## Collects coverage with phpunit
vendor/bin/phpunit --coverage-text --coverage-clover=.build/logs/clover.xml
.PHONY: test
test: vendor ## Runs tests with phpunit
vendor/bin/phpunit
.PHONY: rector
rector: vendor ## Runs rector
vendor/bin/rector process test/ --config=rector-migrate.php --dry-run
.PHONY: static
static: vendor ## Runs static analyzers
vendor/bin/phpstan
vendor/bin/psalm
.PHONY: baseline
baseline: vendor ## Generate baseline files
vendor/bin/phpstan --generate-baseline
vendor/bin/psalm --set-baseline=psalm.baseline.xml
.PHONY: clean
clean: ## Cleans up build and vendor files
rm -rf vendor composer.lock .build
vendor: always
composer update --no-interaction
composer bin all install --no-interaction