-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (47 loc) · 1.43 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
51
52
53
54
55
56
57
58
59
60
61
62
63
.DEFAULT: _info
@echo "No make target defined"
.PHONY: _info
_info:
@echo "Running make target '$(MAKECMDGOALS)' of '$(abspath $(lastword $(MAKEFILE_LIST)))'"
.PHONY: docs
docs: _info
$(MAKE) -C ./docs/site build
.PHONY: clean
clean: _info
rm -rf vendor .phpunit.cache .php-cs-fixer.cache cobertura.xml composer.lock
.PHONY: vendors
vendors: _info
composer install
.PHONY: high-deps
high-deps: _info
composer update
.PHONY: low-deps
low-deps: _info
composer update --prefer-lowest
# Run linters
.PHONY: lint
lint: _info _lint-php
.PHONY: _lint-php
_lint-php:
php vendor/bin/php-cs-fixer fix --dry-run --diff
.PHONY: lint-fix
lint-fix: _info
php vendor/bin/php-cs-fixer fix --diff
.PHONY: test
test: _info _test-stan _test-unit
.PHONY: _test-unit
_test-unit: _test-unit-low-deps _test-unit-high-deps
.PHONY: _test-stan
_test-stan: _test-stan-low-deps _test-stan-high-deps
.PHONY: _test-stan-high-deps
_test-stan-high-deps: high-deps
vendor/bin/phpstan --memory-limit=512M analyse
.PHONY: _test-stan-low-deps
_test-stan-low-deps: low-deps
vendor/bin/phpstan --memory-limit=512M analyse
.PHONY: _test-unit-high-deps
_test-unit-high-deps: high-deps
XDEBUG_MODE=coverage vendor/bin/phpunit -d memory_limit=256M --coverage-cobertura=./cobertura.xml --coverage-text
.PHONY: _test-unit-low-deps
_test-unit-low-deps: low-deps
XDEBUG_MODE=coverage vendor/bin/phpunit -d memory_limit=256M --coverage-cobertura=./cobertura.xml --coverage-text