Ability to run tests in docker
This commit is contained in:
parent
29d6732404
commit
b478dd6f25
2
.gitignore
vendored
2
.gitignore
vendored
@ -194,5 +194,7 @@ build/*
|
|||||||
|
|
||||||
# Test report & coverage
|
# Test report & coverage
|
||||||
test-report.xml
|
test-report.xml
|
||||||
|
.phpunit.result.cache
|
||||||
clover.xml
|
clover.xml
|
||||||
composer.lock
|
composer.lock
|
||||||
|
docker-compose.yml
|
||||||
|
13
Makefile
13
Makefile
@ -1,15 +1,16 @@
|
|||||||
ROOT_DIR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
ifneq ("$(wildcard docker-compose.yml)","")
|
||||||
SRC_DIR=$(ROOT_DIR)/src
|
PHP=docker-compose run --rm --no-deps php php
|
||||||
BIN_DIR=$(ROOT_DIR)/vendor/bin
|
else
|
||||||
|
PHP=php
|
||||||
|
endif
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@echo "==> Running tests"
|
@echo "==> Running tests"
|
||||||
@cd $(ROOT_DIR)
|
|
||||||
@cp .env.dist .env
|
@cp .env.dist .env
|
||||||
@php -d memory_limit=-1 $(BIN_DIR)/phpunit -c phpunit.xml.dist
|
@$(PHP) -d memory_limit=-1 vendor/bin/phpunit -c phpunit.xml.dist
|
||||||
@echo "==> Testing complete"
|
@echo "==> Testing complete"
|
||||||
|
|
||||||
stan:
|
stan:
|
||||||
@echo "==> Running analysis"
|
@echo "==> Running analysis"
|
||||||
@php $(BIN_DIR)/phpstan analyse
|
@$(PHP) vendor/bin/phpstan analyse
|
||||||
@echo "==> Analysis complete"
|
@echo "==> Analysis complete"
|
||||||
|
Loading…
Reference in New Issue
Block a user