forked from nelmio/alice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
120 lines (85 loc) · 3.76 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
COVERS_VALIDATOR=php -d zend.enable_gc=0 vendor-bin/covers-validator/bin/covers-validator
INFECTION=vendor-bin/infection/bin/infection --test-framework-options="--exclude-group=integration"
PHPDBG=phpdbg -qrr -d zend.enable_gc=0 bin/phpunit
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/php-cs-fixer/bin/php-cs-fixer
PHPSTAN=php -d zend.enable_gc=0 -dmemory_limit=1G vendor-bin/phpstan/bin/phpstan
PHPUNIT=php -d zend.enable_gc=0 bin/phpunit
PHPUNIT_SYMFONY=php -d zend.enable_gc=0 vendor-bin/symfony/bin/phpunit
.DEFAULT_GOAL := help
.PHONY: test tm ts tc tm cs phpstan cs
help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
##
## Tests
##---------------------------------------------------------------------------
test: ## Run all the tests
test: tu ts
tu: ## Run the tests for the core library
tu: vendor/phpunit vendor-bin/covers-validator/vendor
#$(COVERS_VALIDATOR)
$(PHPUNIT)
ts: ## Run the tests for the Symfony Bridge
ts: vendor-bin/symfony/vendor vendor-bin/covers-validator/vendor
#$(COVERS_VALIDATOR) -c phpunit_symfony.xml.dist
$(PHPUNIT_SYMFONY) -c phpunit_symfony.xml.dist
tc: ## Run the tests with coverage
tc: vendor/phpunit
$(PHPDBG) --exclude-group=integration --coverage-text --coverage-html=dist/coverage --coverage-clover=dist/clover.xml
tm: ## Run the tests for mutation testing
tm: vendor/phpunit vendor-bin/infection/vendor
$(INFECTION)
tp: ## Run Blackfire performance tests
tp: vendor vendor-bin/profiling/vendor
php profiling/scenario0/blackfire.php
php profiling/scenario1/blackfire.php
php profiling/scenario2/blackfire.php
php profiling/scenario3/blackfire.php
##
## Code Analysis
##
##---------------------------------------------------------------------------
phpstan: ## Run PHPStan analysis
phpstan: vendor-bin/phpstan/vendor
$(PHPSTAN) analyze -c phpstan.neon -l4 src tests
##
## Code Style
##---------------------------------------------------------------------------
cs: ## Run the CS Fixer
cs: vendor-bin/php-cs-fixer/vendor
rm -rf fixtures/Bridge/Symfony/Application/cache/*
$(PHP_CS_FIXER) fix
##
## Rules from files
##---------------------------------------------------------------------------
composer.lock: composer.json
@echo compose.lock is not up to date.
vendor: composer.lock
composer install
vendor/phpunit: composer.lock
composer install
vendor-bin/symfony/vendor: vendor-bin/symfony/composer.lock
composer bin symfony install
vendor-bin/symfony/composer.lock: vendor-bin/symfony/composer.json
@echo symfony compose.lock is not up to date.
vendor-bin/php-cs-fixer/vendor: vendor-bin/php-cs-fixer/composer.lock
composer bin php-cs-fixer install
vendor-bin/php-cs-fixer/composer.lock: vendor-bin/php-cs-fixer/composer.json
@echo php-cs-fixer composer.lock is not up to date.
vendor-bin/phpstan/vendor: vendor-bin/phpstan/composer.lock
composer bin phpstan install
vendor-bin/phpstan/composer.lock: vendor-bin/phpstan/composer.json
@echo phpstan composer.lock is not up to date
vendor-bin/profiling/vendor: vendor-bin/profiling/composer.lock
composer bin profiling install
vendor-bin/profiling/composer.lock: vendor-bin/profiling/composer.json
@echo profiling composer.lock is not up to date
vendor-bin/infection/vendor: vendor-bin/infection/composer.lock
composer bin infection install
vendor-bin/infection/composer.lock: vendor-bin/infection/composer.json
@echo infection composer.lock is not up to date
vendor-bin/covers-validator/vendor: vendor-bin/covers-validator/composer.lock
composer bin covers-validator install
vendor-bin/covers-validator/composer.lock: vendor-bin/covers-validator/composer.json
@echo covers-validator composer.lock is not up to date
dist/clover.xml: vendor/phpunit
$(MAKE) tc