-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (47 loc) · 1.54 KB
/
Makefile
File metadata and controls
61 lines (47 loc) · 1.54 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
COMPOSER_BIN := composer
PHP_BIN := php
PHP_CS_FIXER_BIN := ./vendor/bin/php-cs-fixer
PHPSTAN_BIN := ./vendor/bin/phpstan
PHPUNIT_BIN := ./vendor/bin/phpunit
PARATEST_BIN := ./vendor/bin/paratest
RECTOR_BIN := ./vendor/bin/rector
.PHONY: it
it: vendor tests cs-check qa
vendor: composer.json $(wildcard composer.lock)
$(COMPOSER_BIN) install --optimize-autoloader
.PHONY: tests
tests: tests-unit tests-integration tests-e2e
.PHONY: tests-unit
tests-unit:
XDEBUG_MODE=off $(PARATEST_BIN) --group=unit
.PHONY: tests-integration
tests-integration:
XDEBUG_MODE=off $(PARATEST_BIN) --group=integration
.PHONY: tests-e2e
tests-e2e:
XDEBUG_MODE=off $(PARATEST_BIN) --group=e2e
.PHONY: tests-coverage
tests-coverage:
XDEBUG_MODE=coverage $(PHPUNIT_BIN) --coverage-html coverage
.PHONY: qa
qa: cs-check analyse
.PHONY: cs-check
cs-check:
XDEBUG_MODE=off PHP_CS_FIXER_FUTURE_MODE=1 PHP_CS_FIXER_IGNORE_ENV=1 $(PHP_CS_FIXER_BIN) fix --allow-risky=yes --diff --using-cache=no --verbose --dry-run
.PHONY: cs-fix
cs-fix:
XDEBUG_MODE=off PHP_CS_FIXER_FUTURE_MODE=1 PHP_CS_FIXER_IGNORE_ENV=1 $(PHP_CS_FIXER_BIN) fix --allow-risky=yes
.PHONY: analyse
analyse:
XDEBUG_MODE=off $(PHPSTAN_BIN) analyse -c phpstan.neon --memory-limit=-1
.PHONY: phpstan-baseline
analyse-baseline:
XDEBUG_MODE=off $(PHPSTAN_BIN) analyze -c phpstan.neon --generate-baseline=.phpstan/baseline.neon --memory-limit=-1
.PHONY: refactor
refactor:
XDEBUG_MODE=off $(RECTOR_BIN) process
.PHONY: release
release:
git tag -as ${VERSION} -m '${VERSION}'
git tag -v ${VERSION}
git push origin ${VERSION}