language: php
php:
  - 5.6
  - 7.1
# faster builds on new travis setup not using sudo
sudo: false
# cache vendor dirs
cache:
  directories:
    - vendor
    - $COMPOSER_CACHE_DIR
# update composer it-self
install:
  - composer self-update
# install package
before_script:
  - phpenv config-rm xdebug.ini
  - composer install --no-interaction
  - mkdir -p build/logs
# run PHPUnit and export code coverage log
script:
  - phpunit -c ./ --coverage-text --coverage-clover build/logs/clover.xml
# build phar
after_success:
  - vendor/bin/box build
# deploy
deploy:
  # deploy docs to website
  - provider: script
    script: bash scripts/deploy-docs.sh
    skip_cleanup: true
    overwrite: true
    on:
      branch: master
      php: '7.0'
  # deploy to GitHub release
  - provider: releases
    api_key: $GITHUB_TOKEN
    file: "dist/phpoole.phar"
    skip_cleanup: true
    overwrite: true
    on:
      tags: true
      php: '7.0'
  # deploy dist file to website
  - provider: script
    script: bash scripts/deploy-dist.sh
    skip_cleanup: true
    overwrite: true
    on:
      tags: true
      php: '7.0'

language: php
php:
  - 5.6
  - 7.1
# faster builds on new travis setup not using sudo
sudo: false
# cache vendor dirs
cache:
  directories:
    - vendor
    - $COMPOSER_CACHE_DIR
# update composer it-self
install:
  - composer self-update
# install package
before_script:
  - phpenv config-rm xdebug.ini
  - composer install --no-interaction
  - mkdir -p build/logs
# run PHPUnit and export code coverage log
script:
  - phpunit -c ./ --coverage-text --coverage-clover build/logs/clover.xml
# build phar
after_success:
  - vendor/bin/box build
# deploy
deploy:
  # deploy docs to website
  - provider: script
    script: bash scripts/deploy-docs.sh
    skip_cleanup: true
    overwrite: true
    on:
      branch: master
      php: '7.1'
  # deploy to GitHub release
  - provider: releases
    api_key: $GITHUB_TOKEN
    file: "dist/phpoole.phar"
    skip_cleanup: true
    overwrite: true
    on:
      tags: true
      php: '7.1'
  # deploy dist file to website
  - provider: script
    script: bash scripts/deploy-dist.sh
    skip_cleanup: true
    overwrite: true
    on:
      tags: true
      php: '7.1'

Fix PHP version for deploy...
Fix PHP version for deploy...