-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile
25 lines (18 loc) · 874 Bytes
/
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
.PHONY: test composer csfix phpstan cs check
TARGET := $(filter-out $(firstword $(MAKECMDGOALS)), $(MAKECMDGOALS))
FIXER_VERSION := 3-php8.2
PHP_VERSION := 8.2-cli
composer:
docker run --rm --interactive --tty \
--volume $$PWD/tmp:/tmp:z \
--volume $$PWD:/app:z \
composer $(TARGET)
phpstan:
docker run -it --rm --name messenger-monitor-bundle -v $$PWD:/usr/src/myapp:z -w /usr/src/myapp php:$(PHP_VERSION) php vendor/bin/phpstan
test:
docker run -it --rm --name messenger-monitor-bundle -v $$PWD:/usr/src/myapp:z -w /usr/src/myapp php:$(PHP_VERSION) php vendor/bin/phpunit
csfix:
docker run -v $$PWD:/code:z ghcr.io/php-cs-fixer/php-cs-fixer:$(FIXER_VERSION) fix --config=.php-cs-fixer.dist.php
cs:
docker run -v $$PWD:/code:z ghcr.io/php-cs-fixer/php-cs-fixer:$(FIXER_VERSION) fix --config=.php-cs-fixer.dist.php --dry-run --diff
check: cs phpstan test