diff --git a/.travis.yml b/.travis.yml index 46111babee..e701ebc5bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,6 +52,7 @@ before_script: # Behat will use behat.yml which is a copy of behat.yml.dist with hostnames update by doc/docker/selenium.yml script: docker-compose exec --user www-data app sh -c "php $TEST_CMD" + after_failure: # Will show us the last bit of the log of container's main processes # (not counting shell process above running php and behat) diff --git a/behat.yml.dist b/behat.yml.dist index 4f237beaac..9b4701b408 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -26,6 +26,13 @@ default: EzSystems\PlatformBehatBundle\ServiceContainer\EzBehatExtension: ~ + Bex\Behat\ScreenshotExtension: + active_image_drivers: cloudinary + image_drivers: + cloudinary: + cloud_name: ezplatformtravis + preset: ezplatform + suites: ~ imports: diff --git a/bin/.travis/runcommand.sh b/bin/.travis/runcommand.sh new file mode 100755 index 0000000000..7329850a34 --- /dev/null +++ b/bin/.travis/runcommand.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +if [ "$1" = "" ]; then + echo "Argument 1 variable for command arguments is empty, please pass arguments" + exit 1 +fi + +# Execute test command, need to use sh to get right exit code (docker/compose/issues/3379) +CMD=\"$@\" +docker-compose exec -T --user www-data app bash -c \""$CMD"\" diff --git a/composer.json b/composer.json index 15bec99c20..b808b8bf38 100644 --- a/composer.json +++ b/composer.json @@ -60,7 +60,9 @@ "behat/mink-extension": "^2.3.1", "behat/mink-goutte-driver": "^1.2.1", "behat/mink-selenium2-driver": "^1.3.1", + "bex/behat-screenshot": "^1.2", "ezsystems/behatbundle": "^6.5.3", + "ezsystems/behat-screenshot-image-driver-cloudinary": "^1.0", "phpunit/phpunit": "^6.4.4", "sensio/generator-bundle": "^3.1.7", "symfony/phpunit-bridge": "^3.4.11" diff --git a/doc/docker/base-dev.yml b/doc/docker/base-dev.yml index e426c92644..3b910a1ee4 100644 --- a/doc/docker/base-dev.yml +++ b/doc/docker/base-dev.yml @@ -10,6 +10,7 @@ services: depends_on: - db environment: + - COMPOSER_MEMORY_LIMIT - SYMFONY_ENV=${SYMFONY_ENV-dev} - SYMFONY_DEBUG - SYMFONY_HTTP_CACHE diff --git a/doc/docker/base-prod.yml b/doc/docker/base-prod.yml index a2a26bcc7e..fe5585f144 100644 --- a/doc/docker/base-prod.yml +++ b/doc/docker/base-prod.yml @@ -11,6 +11,7 @@ services: depends_on: - db environment: + - COMPOSER_MEMORY_LIMIT - SYMFONY_ENV=${SYMFONY_ENV-prod} - SYMFONY_DEBUG - SYMFONY_HTTP_CACHE