## Run on container environment
sudo: false

language: php

php:
- 5.6
- 7

matrix:
  include:
    - php: 5.6
      env: dependencies=lowest
    - php: 7
      env: dependencies=lowest
    - php: 5.6
      env: dependencies=highest
    - php: 7
      env: dependencies=highest

## Cache composer bits, where possible
cache:
  directories:
    - vendor
    - $HOME/.composer/cache

before_script:
  - phpenv config-add .travis.php.ini
  - composer self-update
  - composer config --global github-oauth.github.com $GITHUB_OAUTH_TOKEN
  - if [ -z "$dependencies" ]; then composer install; fi;
  - if [ "$dependencies" = "lowest" ]; then rm -rf vendor; composer update --prefer-lowest --no-interaction ; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --no-interaction ; fi;
  - composer install --prefer-dist

script:
  - ant

branches:
  only:
  - master

## Run on container environment
sudo: false

language: php

php:
- 5.6
- 7

matrix:
  include:
    - php: 5.6
      env: dependencies=lowest
    - php: 7
      env: dependencies=lowest
    - php: 5.6
      env: dependencies=highest
    - php: 7
      env: dependencies=highest
    - php: nightly
      env: dependencies=highest
  allow_failures:
    - php: nightly
  fast_finish: true

## Cache composer bits, where possible
cache:
  directories:
    - vendor
    - $HOME/.composer/cache

before_script:
  - phpenv config-add .travis.php.ini
  - composer self-update
  - composer config --global github-oauth.github.com $GITHUB_OAUTH_TOKEN
  - if [ -z "$dependencies" ]; then composer install; fi;
  - if [ "$dependencies" = "lowest" ]; then rm -rf vendor; composer update --prefer-lowest --no-interaction ; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --no-interaction ; fi;
  - composer install --prefer-dist

script:
  - ant

Add php:nightly to tests, and enable fast_finish
Add php:nightly to tests, and enable fast_finish

fast_finish marks the tests as pass or fail, when a definitive result is known, but not necessarily waiting till it has completed