language: php

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

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

branches:
  only:
    - master

install:
  - composer install

before_script:
  - wget http://api-key-dealer.herokuapp.com/clients/algolia-keys && chmod +x algolia-keys

script:
  - if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [[ ! "$TRAVIS_PULL_REQUEST_SLUG" =~ ^algolia\/ ]]; then eval $(./algolia-keys export) && php vendor/bin/phpunit --testsuite community; else php vendor/bin/phpunit --testsuite all; fi

language: php

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

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

branches:
  only:
    - master

install:
  - composer install

before_script:
  - wget https://alg.li/algolia-keys && chmod +x algolia-keys

script:
  - if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [[ ! "$TRAVIS_PULL_REQUEST_SLUG" =~ ^algolia\/ ]]; then eval $(./algolia-keys export) && php vendor/bin/phpunit --testsuite community; else php vendor/bin/phpunit --testsuite all; fi

Use alg.li short link for algola-keys client
Use alg.li short link for algola-keys client
