language: php

php:
  - 7.0
  - 7.1
  - 7.2

sudo: false

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

branches:
  only:
    - master
    - /^\d+\.\d+$/

matrix:
  fast_finish: true
  include:
    - php: 7.0
      env: COMPOSER_FLAGS="--prefer-lowest"

before_install:
  - composer self-update

install: composer update $COMPOSER_FLAGS

script: vendor/bin/phpunit
