@@ -2,81 +2,83 @@ language: php
22
33dist : trusty
44
5- sudo : false
6-
75php :
86 - 7.2
97
10- cache :
11- yarn : true
12- directories :
13- - ~/.composer/cache/files
14- - $SYLIUS_CACHE_DIR
15-
16- env :
17- global :
18- - SYLIUS_CACHE_DIR=$HOME/.sylius-cache
19- - SYLIUS_BUILD_DIR=etc/build
20- matrix :
21- - SYMFONY_VERSION="3.4.*"
22- - SYMFONY_VERSION="4.1.*"
23-
24- before_install :
25- - phpenv config-rm xdebug.ini
26- - echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
27- - mkdir -p "${SYLIUS_CACHE_DIR}"
28-
29- - cp tests/Application/.env.test.dist tests/Application/.env.test
30- - set -a && source tests/Application/.env.test && set +a
31-
32- install :
33- - composer require "symfony/symfony:${SYMFONY_VERSION}" --no-interaction --no-update
34- - composer install --no-interaction --prefer-dist
35- - (cd tests/Application && yarn install)
36-
37- before_script :
38- - (cd tests/Application && bin/console doctrine:database:create --env=test -vvv)
39- - (cd tests/Application && bin/console doctrine:schema:create --env=test -vvv)
40- - (cd tests/Application && bin/console assets:install --env=test -vvv)
41- - (cd tests/Application && bin/console cache:warmup --env=test -vvv)
42- - (cd tests/Application && yarn build)
43-
44- # Configure display
45- - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1680x1050x16
46- - export DISPLAY=:99
47-
48- # Download and configure ChromeDriver
49- - |
50- if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c 2.34)" = "0" ]; then
51- curl http://chromedriver.storage.googleapis.com/2.34/chromedriver_linux64.zip > chromedriver.zip
52- unzip chromedriver.zip
53- chmod +x chromedriver
54- mv chromedriver $SYLIUS_CACHE_DIR
55- fi
56-
57- # Run ChromeDriver
58- - $SYLIUS_CACHE_DIR/chromedriver > /dev/null 2>&1 &
59-
60- # Download and configure Selenium
61- - |
62- if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ] || [ "$(java -jar $SYLIUS_CACHE_DIR/selenium.jar --version | grep -c 3.4.0)" = "0" ]; then
63- curl http://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar > selenium.jar
64- mv selenium.jar $SYLIUS_CACHE_DIR
65- fi
66-
67- # Run Selenium
68- - java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 &
69-
70- # Run webserver
71- - (cd tests/Application && bin/console server:run 127.0.0.1:8080 --env=test --quiet > /dev/null 2>&1 &)
72-
73- script :
74- - composer validate --strict
75- - composer analyse
76-
77- - vendor/bin/phpunit
78- - vendor/bin/phpspec run
79- - vendor/bin/behat --strict -vvv --no-interaction --tags="~@todo" || vendor/bin/behat --strict -vvv --no-interaction --rerun --tags="~@todo"
80-
81- after_failure :
82- - vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log"
8+ jobs :
9+ include :
10+ - &test
11+ stage : test
12+ name : " Symfony 4.1.* build"
13+
14+ sudo : false
15+
16+ env : SYLIUS_CACHE_DIR=$HOME/.sylius-cache SYLIUS_BUILD_DIR=etc/build
17+
18+ cache :
19+ yarn : true
20+ directories :
21+ - ~/.composer/cache/files
22+ - $SYLIUS_CACHE_DIR
23+
24+ services :
25+ - memcached
26+ - mysql
27+
28+ before_install :
29+ - phpenv config-rm xdebug.ini || true
30+
31+ - echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
32+ - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
33+
34+ - cp tests/Application/.env.test.dist tests/Application/.env.test
35+ - set -a && source tests/Application/.env.test && set +a
36+
37+ install :
38+ - composer update --no-interaction --prefer-dist
39+ - (cd tests/Application && yarn install)
40+
41+ before_script :
42+ - (cd tests/Application && bin/console doctrine:database:create --env=test -vvv)
43+ - (cd tests/Application && bin/console doctrine:schema:create --env=test -vvv)
44+ - (cd tests/Application && bin/console assets:install --env=test -vvv)
45+ - (cd tests/Application && bin/console cache:warmup --env=test -vvv)
46+ - (cd tests/Application && yarn build)
47+
48+ # Configure display
49+ - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1680x1050x16
50+ - export DISPLAY=:99
51+
52+ # Download and configure ChromeDriver
53+ - |
54+ if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c 2.34)" = "0" ]; then
55+ curl http://chromedriver.storage.googleapis.com/2.34/chromedriver_linux64.zip > chromedriver.zip
56+ unzip chromedriver.zip
57+ chmod +x chromedriver
58+ mv chromedriver $SYLIUS_CACHE_DIR
59+ fi
60+ # Run ChromeDriver
61+ - $SYLIUS_CACHE_DIR/chromedriver > /dev/null 2>&1 &
62+
63+ # Download and configure Selenium
64+ - |
65+ if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ] || [ "$(java -jar $SYLIUS_CACHE_DIR/selenium.jar --version | grep -c 3.4.0)" = "0" ]; then
66+ curl http://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar > selenium.jar
67+ mv selenium.jar $SYLIUS_CACHE_DIR
68+ fi
69+ # Run Selenium
70+ - java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 &
71+
72+ # Run webserver
73+ - (cd tests/Application && bin/console server:run 127.0.0.1:8080 --env=test --quiet > /dev/null 2>&1 &)
74+
75+ script :
76+ - composer validate --strict
77+ - composer analyse
78+
79+ - vendor/bin/phpunit
80+ - vendor/bin/phpspec run
81+ - vendor/bin/behat --strict -vvv --no-interaction --tags="~@todo" || vendor/bin/behat --strict -vvv --no-interaction --rerun --tags="~@todo"
82+
83+ after_failure :
84+ - vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log"s
0 commit comments