language: php

install:
  - mkdir -p build/logs

php:
  - 7.0
  - 7.1
  - nightly

env:
  matrix:
    - DEPENDENCIES="high"
    - DEPENDENCIES="low"

install:
  - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update --no-interaction --prefer-stable; fi
  - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update --no-interaction --prefer-stable --prefer-lowest; fi

before_script:
  - if [[ "$DEPENDENCIES" = 'low' ]]; then export PHP_ARGS=$(php -r "echo '-d error_reporting=', E_ALL ^ (E_DEPRECATED | E_USER_DEPRECATED);"); else export PHP_ARGS=''; fi

script:
  - php ${PHP_ARGS} vendor/bin/phpunit
  - php -n ${PHP_ARGS} speedtest/console.php test-links
  - php examples/months.php
  - php examples/symfony.php

after_script:
  - travis_retry bin/coveralls.sh

language: php

install:
  - mkdir -p build/logs

php:
  - 7.0
  - 7.1
  - nightly

matrix:
  allow_failures:
    - php: nightly

env:
  matrix:
    - DEPENDENCIES="high"
    - DEPENDENCIES="low"

install:
  - if [[ "$DEPENDENCIES" = 'high' ]]; then travis_retry composer update --no-interaction --prefer-stable; fi
  - if [[ "$DEPENDENCIES" = 'low' ]]; then travis_retry composer update --no-interaction --prefer-stable --prefer-lowest; fi

before_script:
  - if [[ "$DEPENDENCIES" = 'low' ]]; then export PHP_ARGS=$(php -r "echo '-d error_reporting=', E_ALL ^ (E_DEPRECATED | E_USER_DEPRECATED);"); else export PHP_ARGS=''; fi

script:
  - php ${PHP_ARGS} vendor/bin/phpunit
  - php -n ${PHP_ARGS} speedtest/console.php test-links
  - php examples/months.php
  - php examples/symfony.php

after_script:
  - travis_retry bin/coveralls.sh

Allow failure for nightly php version
Allow failure for nightly php version
