language: php
php:
  - 7
  - 7.1
  - 7.2

env:
  global:
    - MEMCACHED_SERVER=127.0.0.1


matrix:
  fast_finish: true

services:
  - memcached

script:
  - ./bin/phpunit --verbose --configuration tests/phpunit.xml.dist
  - ./bin/sabre-cs-fixer fix lib/ --dry-run --diff

before_script:
  - yes '' | pecl install -f apcu
  - echo "apc.enable_cli=1" > sabrecache.ini
  - echo "extension=memcached.so" >> sabrecache.ini
  - phpenv config-add sabrecache.ini
  - composer install
