language: php

branches:
  # Only test the master branch and SemVer tags.
  only:
    - master
    - /^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/

php:
  - 7.0
  - 5.6
  - 5.5

sudo: false

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

before_script:
  - 'if [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then rm composer.lock; composer require --no-update "phpunit/php-code-coverage:~2"; fi'
  - composer install -n --prefer-source

script: "./robo test --coverage"

after_success:
  - travis_retry php vendor/bin/coveralls -v

language: php

branches:
  # Only test the master branch and SemVer tags.
  only:
    - master
    - /^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/

php:
  - 7.0
  - 5.6
  - 5.5

sudo: false

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

before_script:
  - 'if [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then rm composer.lock; composer require --no-update "phpunit/php-code-coverage:~2"; fi'
  - composer install -n --prefer-source

script: "./robo test --coverage"

after_success:
  - travis_retry php vendor/bin/coveralls -v

# Prior to a deploy, build a fresh robo.phar
before_deploy:
  - test $TRAVIS_TAG=true && ./robo phar:build

# Deploy instructions set up via `travis setup releases` per
# https://docs.travis-ci.com/user/deployment/releases
deploy:
  provider: releases
  api_key:
    secure: EdmB1nW5gj5nggYfmHv20enSgvRIAl1PIWV5GKmkxAJwuummh3UqdI7z0ecTGdw2IBgJx9lizNvqhcWjXbpNhE9VaaT1sHFCKv4Zust6sLb9bneK3oLRdJk2wemfrrZQpdH900zA0o7b3CHVth8UhkrCB4FXVDjUW13K061EXG8=
  file: robo.phar
  on:
    repo: consolidation/Robo

Add a deploy step to push robo.phar up to GitHub after a tag build passes.
Add a deploy step to push robo.phar up to GitHub after a tag build passes.
