diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ build/ + +/vendor/ +composer.lock diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -3,12 +3,19 @@ ### We use PHPUnit to test several parts of our infrastructure. ### +PHPUNIT=vendor/bin/phpunit + ENV_FOR_TEST_FULL= \ DOCKER_ACCESS=1 \ DOCKER_HOST=equatower.nasqueron.org \ -test: - phpunit --log-junit build/phpunit.xml -v . +all: test + +vendor: + composer install + +test: vendor + ${PHPUNIT} --log-junit build/phpunit.xml -v -test-full: - sh -c "${ENV_FOR_TEST_FULL} phpunit --log-junit build/phpunit.xml -v ." +test-full: vendor + sh -c "${ENV_FOR_TEST_FULL} ${PHPUNIT} --log-junit build/phpunit.xml -v" diff --git a/composer.json b/composer.json new file mode 100644 --- /dev/null +++ b/composer.json @@ -0,0 +1,15 @@ +{ + "name": "nasqueron/tests-prod-environment-behaves-correctly", + "description": "Tests to validate production environment", + "type": "project", + "require": { + "phpunit/phpunit": "^7.3" + }, + "license": "BSD-2-Clause", + "authors": [ + { + "name": "Sébastien Santoro", + "email": "dereckson@espace-win.org" + } + ] +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,11 @@ + + + + . + vendor + + +