sudo: false

language: php

notifications:
  email:
    on_success: never
    on_failure: change

branches:
  only:
    - master

cache:
  directories:
    - vendor
    - $HOME/.composer/cache

matrix:
  include:
    - php: 7.1
      env: WP_VERSION=latest
    - php: 7.0
      env: WP_VERSION=latest
    - php: 5.6
      env: WP_VERSION=latest
    - php: 7.0
      env: WP_VERSION=trunk

before_script:
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
  - |
    if [[ ! -z "$WP_VERSION" ]] ; then
      bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
      if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then
        composer global require "phpunit/phpunit=4.8.*"
      else
        composer global require "phpunit/phpunit=5.7.*"
      fi
    fi

script:
  - |
    if [[ ! -z "$WP_VERSION" ]] ; then
      phpunit
      WP_MULTISITE=1 phpunit
    fi

sudo: false

language: php

notifications:
  email: false

cache:
  directories:
    - vendor
    - $HOME/.composer/cache

matrix:
  include:
    - php: 7.1
      env: WP_VERSION=latest
    - php: 7.0
      env: WP_VERSION=latest
    - php: 5.6
      env: WP_VERSION=latest
    - php: 7.0
      env: WP_VERSION=trunk

before_script:
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
  - |
    if [[ ! -z "$WP_VERSION" ]] ; then
      bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
      if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then
        composer global require "phpunit/phpunit=4.8.*"
      else
        composer global require "phpunit/phpunit=5.7.*"
      fi
    fi

script:
  - |
    if [[ ! -z "$WP_VERSION" ]] ; then
      phpunit
      WP_MULTISITE=1 phpunit
    fi

Disable email notifications and remove branch restrictions on building with Travis CI
Disable email notifications and remove branch restrictions on building with Travis CI
