sudo: false

language: php
php:
  - 7.0
  - 7.1
  - 7.2
  - nightly

matrix:
  allow_failures:
    - php: nightly

env:
  global:
    - PHAN_DISABLE_XDEBUG_WARN=1

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

install:
  - pecl install ast
  - composer install --prefer-dist

script:
  - composer validate
  - vendor/bin/phpunit --verbose || travis_terminate 1
  - mkdir -p build/cache && vendor/bin/php-cs-fixer --cache-file=build/cache/.php_cs.cache --diff --dry-run --stop-on-violation --verbose fix
  - vendor/bin/phan --init --init-level=1 --init-overwrite > /dev/null && vendor/bin/phan
  - vendor/bin/phpstan analyse src tests --level=2 -c .phpstan.neon --no-interaction --no-progress
  - php vendor/bin/infection --min-msi=95 --min-covered-msi=100 --log-verbosity=2 --threads=4

after_success:
  - travis_retry php vendor/bin/php-coveralls
  - travis_retry php vendor/bin/codacycoverage clover build/logs/clover.xml

sudo: false

language: php
php:
  - 7.0
  - 7.1
  - 7.2
  - nightly

matrix:
  allow_failures:
    - php: nightly

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

install:
  - pecl install ast
  - composer install --prefer-dist

script:
  - make test

after_success:
  - travis_retry php vendor/bin/php-coveralls
  - travis_retry php vendor/bin/codacycoverage clover build/logs/clover.xml

Use make for running tests on Travis CI
Use make for running tests on Travis CI
