2 # - run testsuite for every PHP version
3 # - run lint for every PHP version
4 # - run Selenium for single PHP version
20 - PHPUNIT_ARGS="--exclude-group selenium"
23 - TESTSUITE_PASSWORD=root
24 - TESTSUITE_URL=http://127.0.0.1:8000
27 - export PATH=~/.composer/vendor/bin/:$PATH
28 - mysql -uroot -e "CREATE DATABASE test"
29 - mysql -uroot < sql/create_tables.sql
30 - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
31 - composer install --dev --no-interaction
32 - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi
33 - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi
34 - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & fi
35 - if [ -n "$SELENIUM" ] ; then ~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi
40 - if [ -z "$SELENIUM" ] ; then ant lint ; fi
42 if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then
45 if [ ! -z "$SELENIUM" ] ; then
46 ant phpunit-nocoverage ;
53 - if [ -f build/logs/clover.xml ] ; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi
54 - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi
55 - if [ -f php.log ] ; then cat php.log ; fi
60 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
62 env: PHPUNIT_ARGS="--exclude-group selenium"
64 env: PHPUNIT_ARGS="--exclude-group selenium"
68 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes"
71 - $HOME/.composer/cache/
74 # trigger Buildtime Trend Service to parse Travis CI log
77 - https://buildtimetrend.herokuapp.com/travis