language: php

sudo: false

matrix:
  include:
    - php: 5.3
      dist: precise
    - php: 5.4
    - php: 5.5
    - php: 5.6
    - php: 7.0
    - php: 7.1
    - php: hhvm
      dist: trusty
  allow_failures:
    - php: hhvm

install: travis_retry composer update --no-interaction

script: vendor/bin/phpunit --verbose

before_deploy: bin/package -v $TRAVIS_TAG

deploy:
  provider: releases
  api_key:
    secure: LL8koDM1xDqzF9t0URHvmMPyWjojyd4PeZ7IW7XYgyvD6n1H6GYrVAeKCh5wfUKFbwHoa9s5AAn6pLzra00bODVkPTmUH+FSMWz9JKLw9ODAn8HvN7C+IooxmeClGHFZc0TfHfya8/D1E9C1iXtGGEoE/GqtaYq/z0C1DLpO0OU=
  file_glob: true
  file: dist/psysh-*.tar.gz
  skip_cleanup: true
  on:
    tags: true
    repo: bobthecow/psysh
    condition: ($TRAVIS_PHP_VERSION = 5.3* || $TRAVIS_PHP_VERSION = 7.1*)
