# The Travis setup: # - run testsuite for every PHP version # - run lint for every PHP version # - run Selenium for single PHP version language: php php: - "7.0" - "5.6" - "5.5" - hhvm - nightly sudo: false env: matrix: - PHPUNIT_ARGS="--exclude-group selenium" global: - TESTSUITE_USER=root - TESTSUITE_PASSWORD=root - TESTSUITE_URL=http://127.0.0.1:8000 before_script: - export PATH=~/.composer/vendor/bin/:$PATH - mysql -uroot -e "CREATE DATABASE test" - mysql -uroot < sql/create_tables.sql - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - composer install --dev --no-interaction - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & fi - if [ -n "$SELENIUM" ] ; then ~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi script: - ant clean - ant locales - if [ -z "$SELENIUM" ] ; then ant lint ; fi - set -e; if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then ant phpunit-hhvm ; else if [ ! -z "$SELENIUM" ] ; then ant phpunit-nocoverage ; else ant phpunit ; fi ; fi after_script: - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi - if [ -f php.log ] ; then cat php.log ; fi matrix: allow_failures: - php: 5.6 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes" - php: hhvm env: PHPUNIT_ARGS="--exclude-group selenium" - php: nightly env: PHPUNIT_ARGS="--exclude-group selenium" - php: "7.0" env: PHPUNIT_ARGS="--exclude-group selenium" fast_finish: true include: - php: 5.6 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes" cache: directories: - $HOME/.composer/cache/ - $HOME/browserstack - $HOME/runkit # trigger Buildtime Trend Service to parse Travis CI log notifications: webhooks: - https://buildtimetrend.herokuapp.com/travis