## Run on container environment
sudo: false

language: php

php:
- 7.2
- 7.3
- nightly

matrix:
  include:
    - php: '7.2'
      env: dependencies=lowest
    - php: '7.2'
      env: dependencies=highest
    - php: '7.3'
      env: dependencies=lowest
    - php: '7.3'
      env: dependencies=highest
    - php: nightly
      env: dependencies=lowest
    - php: nightly
      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 composer update --prefer-lowest --no-interaction ; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --no-interaction ; fi;
  - composer install --prefer-dist

script:
- ant

after_success:
    - bash <(curl -s https://codecov.io/bash)

branches:
  only:
  - master

## Run on container environment
sudo: false

language: php

php:
- 7.2
- 7.3
- nightly

matrix:
  include:
    - php: '7.2'
      env: dependencies=lowest
    - php: '7.2'
      env: dependencies=highest
    - php: '7.3'
      env: dependencies=lowest
    - php: '7.3'
      env: dependencies=highest
    - php: nightly
      env: dependencies=lowest TEST_GROUP=canFail
    - php: nightly
      env: dependencies=highest TEST_GROUP=canFail

## 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 composer update --prefer-lowest --no-interaction ; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --no-interaction ; fi;
  - composer install --prefer-dist

script:
- ant

after_success:
    - bash <(curl -s https://codecov.io/bash)

branches:
  only:
  - master

Update test matrix, allows php-nightly to fail
Update test matrix, allows php-nightly to fail
