language: php

sudo: false

dist: trusty

git:
  depth: 5
  
cache:
  directories:
    - $HOME/.composer/cache

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3
  - nightly

env:
  global:
    - PATH="$HOME/.composer/vendor/bin:$PATH"

matrix:
  include:
    - dist: precise
      php: 5.3
  fast_finish: true
  allow_failures:
    - php: nightly

install:
  - mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d && echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
  - mkdir -p build/logs
  - composer global require satooshi/php-coveralls:@stable --no-update
  - composer global update --prefer-dist --no-interaction
  - composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

script:
  - vendor/bin/phpunit

after_script:
  - coveralls -v
