language: php
php:
  - '5.5.38'
  - '5.6.25'
  - '7.0'
  - '7.1'
env:
  - PROTOBUF_C_EXT=true
  - PROTOBUF_C_EXT=false
matrix:
  exclude:
    - php: '5.5.38'
      env: PROTOBUF_C_EXT=true
    - php: '7.0'
      env: PROTOBUF_C_EXT=true
sudo: required
dist: trusty
install:
  - travis_retry pecl install grpc
  - if [[ $PROTOBUF_C_EXT =~ ^true ]]; then travis_retry pecl install protobuf; fi
  - composer install
script:
  - vendor/bin/phpunit --coverage-clover=coverage.xml
  - vendor/bin/phpcs --standard=./ruleset.xml
after_success:
  - bash <(curl -s https://codecov.io/bash)
