language: php

matrix:
    include:
        - php: 7.1
          env: SYMFONY_VERSION=~4.0
        - php: 7.2
          env: SYMFONY_VERSION=~4.0
        - php: 7.3
          env: SYMFONY_VERSION=~4.0
install:
    - composer require --dev --no-update symfony/symfony:$SYMFONY_VERSION;
    - composer update --prefer-dist

script:
    - ./vendor/bin/phpunit --coverage-clover ./build/clover.xml
    -  php build/coverage-checker.php build/clover.xml 70
    - ./vendor/bin/phpcs --standard=PSR2 ./lib/ ./tests/ExcelBundleTests/ ./tests/app/FakeAppKernel.php ./tests/app/Controller/

after_script:
    - if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
    - if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover ./build/clover.xml; fi
