forked from kreait/firebase-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (37 loc) · 1.2 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
45
46
47
48
49
50
.DEFAULT_GOAL:= help
.PHONY: tests
tests: phpstan unit-tests integration-tests
.PHONY: phpstan
phpstan: ## Performs static code analysis
vendor/bin/phpstan analyse
.PHONY: unit-tests
unit-tests: ## Executes the unit test suite
vendor/bin/phpunit -v --testsuite unit
.PHONY: integration-tests
integration-tests: ## Executes the integration test suite
vendor/bin/phpunit -v --testsuite integration
.PHONY: coverage
coverage: ## Executes the test suite and generates code coverage reports
php -dxdebug.mode=coverage vendor/bin/phpunit -v --coverage-html=build/coverage
.PHONY: view-coverage
view-coverage: ## Shows the code coverage report
php -S localhost:1337 -t build/coverage
.PHONY: docs
docs: ## Builds the documentation
$(MAKE) -C docs html
.PHONY: view-docs
view-docs: ## Shows the documentation
php -S localhost:1338 -t docs/_build/html
.PHONY: cs
cs: ## Applies coding standards
vendor/bin/ecs check --fix
.PHONY: rector
rector: ## Applies rector rules
vendor/bin/rector process
.PHONY: clean
clean:
rm -rf build/*
rm -rf docs/_build/*
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'