language: php
php:
  - 5.5
  - 5.6
  - 7
  - hhvm

matrix:
  fast_finish: true
  allow_failures:
      - php: hhvm

env:
  matrix:
    - LOWEST_DEPS="" TEST_DEPS=""
    - LOWEST_DEPS="--prefer-lowest" TEST_DEPS="tests/Sabre/"

services:
  - mysql

sudo: false

cache: vendor

before_script:
  - mysql -e 'create database sabredav'
  #  - composer self-update
  - composer update --prefer-source $LOWEST_DEPS

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

