-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (22 loc) · 940 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
26
27
28
29
# make install
install:
@docker run --rm -it -v$(PWD):/app composer install
# unit tests
phpunit:
@docker run --rm -it -v$(PWD):/app --workdir=/app php:8.0-cli-alpine vendor/bin/phpunit
# psalm
psalm:
@docker run --rm -it -v$(PWD):/app --workdir=/app php:8.0-cli-alpine vendor/bin/psalm --show-info=true
# phpstan
phpstan:
@docker run --rm -it -v$(PWD):/app --workdir=/app php:8.0-cli-alpine vendor/bin/phpstan analyse -l max -c phpstan.neon src --ansi
# coding style fix
phpcs:
@docker run --rm -it -v$(PWD):/app --workdir=/app php:8.0-cli-alpine vendor/bin/php-cs-fixer fix -vvv --allow-risky=yes
# phpmd
phpmd:
@docker run --rm -it -v$(PWD):/app --workdir=/app php:8.0-cli-alpine vendor/bin/phpmd src text phpmd.xml --exclude=vendor --ansi
# rest api
rest:
@docker run --rm -it -v$(PWD):/app --workdir=/app -p4000:4000 php:8.0-cli-alpine php -S 0.0.0.0:4000 -t public
.PHONY: install phpunit psalm phpstan phpcs phpmd rest