language: php matrix: include: - php: 5.4 env: WP_VERSION=latest WP_MULTISITE=0 WP_TRAVISCI=travis:phpunit - php: 7.0 env: WP_VERSION=latest WP_MULTISITE=0 WP_TRAVISCI=travis:phpunit - php: 5.4 env: WP_VERSION=latest WP_MULTISITE=1 WP_TRAVISCI=travis:phpunit - php: 5.4 env: WP_TRAVISCI=travis:lint before_script: # If PHP5.2, hack around composer not being available. - | if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]] ; then phpenv global 5.4 && composer install && phpenv global "$TRAVIS_PHP_VERSION" fi # If not PHP 5.2, standard composer install. - | if [[ "$TRAVIS_PHP_VERSION" != "5.2" ]] ; then composer install fi # Ensure up to NodeJS for ES6. - nvm install v6.6.0 - npm install # If running tests, install test install. - | if [[ "$WP_TRAVISCI" == "travis:phpunit" ]] ; then bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION fi script: - | if [[ "$WP_TRAVISCI" == "travis:lint" ]] ; then node_modules/gulp/bin/gulp.js lint fi - | if [[ "$WP_TRAVISCI" == "travis:phpunit" ]] ; then phpunit fi branches: only: - master - dev notifications: email: false