diff --git a/.travis.yml b/.travis.yml index 5b2901df81..d643d23cd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,12 @@ # for travis-ci # see also. https://travis-ci.org +dist: xenial language: php services: - docker -sudo: false + - mysql + - postgresql + - xvfb php: - 5.4 - 5.5 @@ -30,11 +33,22 @@ env: matrix: fast_finish: true + include: + - php: 5.4 + dist: trusty + env: DB=mysql USER=root DBPASS=' ' DBUSER=root DIST=trusty + - php: 5.4 + dist: trusty + env: DB=pgsql USER=postgres DBPASS=password DBUSER=postgres DIST=trusty + - php: 5.5 + dist: trusty + env: DB=mysql USER=root DBPASS=' ' DBUSER=root DIST=trusty + - php: 5.5 + dist: trusty + env: DB=pgsql USER=postgres DBPASS=password DBUSER=postgres DIST=trusty exclude: - php: 5.4 - env: DB=pgsql USER=postgres DBPASS=password DBUSER=postgres COVERAGE=true - php: 5.5 - env: DB=pgsql USER=postgres DBPASS=password DBUSER=postgres COVERAGE=true - php: 5.6 env: DB=pgsql USER=postgres DBPASS=password DBUSER=postgres COVERAGE=true - php: 7.0 @@ -49,6 +63,8 @@ matrix: env: DB=pgsql USER=postgres DBPASS=password DBUSER=postgres COVERAGE=true before_script: + - if [[ $DB = 'mysql' ]]; then mysql -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';" ; fi + ## see https://github.com/symfony/symfony/blob/e0bdc0c35e9afdb3bee8af172f90e9648c4012fc/.travis.yml#L92-L97 - phpenv config-rm xdebug.ini || true - echo "opcache.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini @@ -58,16 +74,14 @@ before_script: - sh -c "if [ '$DB' = 'mysql' ]; then sh ./eccube_install.sh mysql; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then sh ./eccube_install.sh appveyor; fi" - cat ./data/config/config.php - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start + - if [[ $DIST = 'trusty' ]]; then export DISPLAY=:99.0 ; fi + - if [[ $DIST = 'trusty' ]]; then sh -e /etc/init.d/xvfb start ; fi - php -S localhost:8085 -t html/ & - wget -c -nc --retry-connrefused --tries=0 http://chromedriver.storage.googleapis.com/2.43/chromedriver_linux64.zip - unzip -o -q chromedriver_linux64.zip - - sudo mv -f ./chromedriver /usr/local/bin/ - - sudo chmod +x /usr/local/bin/chromedriver - docker pull schickling/mailcatcher - docker run -d -p 1080:1080 -p 1025:1025 --name mailcatcher schickling/mailcatcher - - chromedriver --url-base=/wd/hub & + - ./chromedriver --url-base=/wd/hub & - php data/vendor/bin/codecept build script: