language: php

sudo: false

php:
  - 5.6
  - 7.0
  - 7.1
  - 7.2
  - 7.3
  - 7.4snapshot
  - nightly

before_script:
  - curl --version
  - composer install --no-interaction --prefer-source --dev
  - ~/.nvm/nvm.sh install v0.6.14
  - ~/.nvm/nvm.sh run v0.6.14
  - if [[ "$TRAVIS_PHP_VERSION" != "7.0" || "$TRAVIS_PHP_VERSION" != "7.1" ]]; then echo "xdebug.overload_var_dump = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini || true; fi

script: make test

matrix:
  allow_failures:
    - php: hhvm
      dist: trusty
    - php: nightly
  include:
    - php: 5.5
      dist: trusty
    - php: hhvm
      dist: trusty
  fast_finish: true

before_deploy:
  - make package

deploy:
  provider: releases
  skip_cleanup: true
  api_key:
    secure: mz9H1B4cPH7dW9hTzgHnbh75+HJ6fJZ9S/1nMWFaqgj5C0wDzTqkJ+BbwiCEiqXGh6VGZbM4EmO1/wnZ7B+Hk8zsB1PP+GKVkq8+7a/261o60W3OS4gQpZQ9R68dyEO1EyZBJvL1Lzc03rkt/0WnKiAjg7nsc1j4aLKhWMDQ6x8=
  file:
    - build/artifacts/guzzle.phar
    - build/artifacts/guzzle.zip
  on:
    repo: guzzle/guzzle
    tags: true
    all_branches: true
    php: 5.5
