-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (33 loc) · 1.05 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
DOCKER=docker-compose -f ./docker/docker-compose.yml
# @todo adapt version and cli/fpm if needed
PHP=php80-cli
build: install
cli:
$(DOCKER) run $(PHP) bash
coverage:
$(DOCKER) run --rm $(PHP) php -dxdebug.mode=coverage ./vendor/bin/phpunit --coverage-text
# @todo remove this rule if not needed
down:
$(DOCKER) down --remove-orphans
fix:
$(DOCKER) run --rm $(PHP) ./vendor/bin/php-cs-fixer fix
install:
$(DOCKER) build
$(DOCKER) run --rm $(PHP) composer install
mutation:
$(DOCKER) run --rm $(PHP) ./vendor/bin/infection --min-msi=80
phpstan:
$(DOCKER) run --rm $(PHP) ./vendor/bin/phpstan analyse
psalm:
$(DOCKER) run --rm $(PHP) ./vendor/bin/psalm --show-info=true
standards:
$(DOCKER) run --rm $(PHP) ./vendor/bin/php-cs-fixer fix --dry-run -v
test: standards unit phpstan psalm mutation
# @todo remove unused commands in project
unit:
$(DOCKER) run --rm $(PHP) ./vendor/bin/phpunit
$(DOCKER) run --rm php81-cli ./vendor/bin/phpunit
$(DOCKER) run --rm php82-cli ./vendor/bin/phpunit
# @todo remove this rule if not needed
up:
$(DOCKER) up -d