forked from fzaninotto/Faker
-
Notifications
You must be signed in to change notification settings - Fork 357
/
Makefile
36 lines (28 loc) · 1.12 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
.PHONY: build
build: cs static test ## Runs cs, static, and test targets
.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/autoload.php ## Fixes coding standard issues with php-cs-fixer
vendor/bin/php-cs-fixer fix --diff --diff-format=udiff --verbose
.PHONY: coverage
coverage: vendor/autoload.php ## Collects coverage with phpunit
vendor/bin/simple-phpunit --coverage-text --coverage-clover=.build/logs/clover.xml
.PHONY: test
test: vendor/autoload.php ## Runs tests with phpunit
vendor/bin/simple-phpunit
.PHONY: static
static: vendor/autoload.php ## Runs static analyzers
vendor/bin/phpstan analyze
vendor/bin/psalm
.PHONY: baseline
baseline: vendor/autoload.php ## Generate baseline files
vendor/bin/phpstan analyze --generate-baseline
vendor/bin/psalm --update-baseline
.PHONY: clean
clean: rm -rf vendor composer.lock .build ## Cleans up build and vendor files
vendor/autoload.php:
composer update --no-interaction
composer bin all install --no-interaction
vendor/bin/simple-phpunit install