-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·51 lines (41 loc) · 1.55 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
47
48
49
50
# install dependencies and clear cache
install:
@docker-compose exec php composer install --optimize-autoloader
@docker-compose exec php composer dump-autoload
@$(MAKE) cache
# enter bash within the php container
enter:
@docker-compose exec php bash
# start all containers
start:
@docker-compose up -d
# stop all containers
stop: ## Stop Containers
@docker-compose stop
# start from scratch, delete & recreate all containers
recreate:
@just stop
@docker-compose rm -f
@docker-compose build
@just start
# clear the cache
cc:
@docker-compose exec php bin/console cache:clear
# Run static code analysis
analyse:
@docker-compose exec php vendor/bin/phpstan analyse --memory-limit 1G --xdebug src
@docker-compose exec php vendor/bin/phpmd src text phpmd.ruleset.xml
# Run testsuites
test:
@docker-compose exec php php vendor/bin/phpunit --log-junit test-results/phpunit.xml
@sed -i "s%/var/www/html/%`pwd`/%" test-results/phpunit.xml
@docker-compose exec php php vendor/bin/behat
# Run testsuite with coverage reporting enabled
coverage:
@docker-compose exec -e XDEBUG_MODE=coverage php php ./vendor/bin/phpunit --coverage-clover ./test-results/coverage/xml/phpunit.xml --log-junit est-results/phpunit.xml
@sed -i "s%/var/www/html/%`pwd`/%" test-results/coverage/xml/phpunit.xml
@docker-compose exec -e XDEBUG_MODE=coverage php vendor/bin/behat --format=junit --out=test-results --format=pretty --out=std -p coverage
@sed -i "s%/var/www/html/%`pwd`/%" test-results/coverage/xml/behat.xml
# Run php-cs-fixer
fix:
@docker-compose exec php vendor/bin/php-cs-fixer fix