language: php

sudo: false
dist: trusty

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

php:
  - 5.6
  - 7.0
  - 7.1
  - hhvm

install:
  - sudo apt-get install openssl
  - composer install
  # PHPUnit
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer require phpunit/phpunit 5.7.*; fi
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer require phpunit/phpunit 5.7.*; fi
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer require phpunit/phpunit 6.1.*; fi
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./vendor/bin/phpunit --version; fi
  - if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then phpunit --version; fi

script:
  # Run PHP unit tests
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./vendor/bin/phpunit -c test/Unit/phpunit.xml.dist; fi
  - if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then phpunit -c test/Unit/phpunit.xml.dist; fi

after_script:
  ## Code climate
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./vendor/bin/test-reporter; fi

language: php

sudo: false
dist: trusty

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

php:
  - 5.6
  - 7.0
  - 7.1
  - hhvm

install:
  #- sudo apt-get install openssl
  - composer install
  # PHPUnit
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer require phpunit/phpunit 5.7.*; fi
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer require phpunit/phpunit 5.7.*; fi
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer require phpunit/phpunit 6.1.*; fi
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./vendor/bin/phpunit --version; fi
  - if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then phpunit --version; fi

script:
  # Run PHP unit tests
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./vendor/bin/phpunit -c test/Unit/phpunit.xml.dist; fi
  - if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then phpunit -c test/Unit/phpunit.xml.dist; fi

after_script:
  ## Code climate
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./vendor/bin/test-reporter; fi

Test php build on Trusty
[CI] Test php build on Trusty
