-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (51 loc) · 2.81 KB
/
Copy pathMakefile
File metadata and controls
70 lines (51 loc) · 2.81 KB
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
help: ## shows this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_\-\.]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
vendor: composer.lock
composer install
.PHONY: phpcs-check
cs-check: vendor ## run phpcs
vendor/bin/phpcs
.PHONY: cs
cs: vendor ## run phpcs fixer
vendor/bin/phpcbf || true
vendor/bin/phpcs
.PHONY: phpstan
phpstan: vendor ## run phpstan static code analyser
vendor/bin/phpstan analyse --memory-limit=-1
.PHONY: phpstan-baseline
phpstan-baseline: vendor ## run phpstan static code analyser
vendor/bin/phpstan analyse --generate-baseline --memory-limit=-1
.PHONY: phpunit
phpunit: vendor ## run phpunit tests
XDEBUG_MODE=coverage vendor/bin/phpunit
.PHONY: infection
infection: vendor ## run infection
XDEBUG_MODE=coverage php -d memory_limit=312M vendor/bin/infection --threads=3
.PHONY: static
static: phpstan cs ## run static analysers
test: phpunit ## run tests
.PHONY: benchmark
benchmark: vendor ## run benchmarks
vendor/bin/phpbench run tests/Benchmark --report=default
.PHONY: benchmark-diff-test
benchmark-diff-test: vendor ## run benchmarks
vendor/bin/phpbench run tests/Benchmark --revs=1 --report=default --progress=none --tag=base
vendor/bin/phpbench run tests/Benchmark --revs=1 --report=diff --progress=none --ref=base
.PHONY: docs
docs: docs-extract-php docs-php-lint docs-phpcs docs-inject-php ## check and format docs code
.PHONY: docs-extract-php
docs-extract-php: vendor
bin/docs-extract-php-code
.PHONY: docs-inject-php
docs-inject-php: vendor
bin/docs-inject-php-code
.PHONY: docs-format
docs-format: docs-phpcs docs-inject-php ## format docs
.PHONY: docs-php-lint
docs-php-lint: docs-extract-php ## lint docs code
php -l docs_php/*.php | grep -E 'Parse error|Fatal error' || true
.PHONY: docs-phpcs
docs-phpcs: docs-extract-php
vendor/bin/phpcbf docs_php --exclude=SlevomatCodingStandard.TypeHints.DeclareStrictTypes,SlevomatCodingStandard.ControlStructures.EarlyExit || true
.PHONY: dev
dev: static test ## run dev tools