language: php

sudo: false

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

branches:
  except:
    - /^bugfix\/.*$/
    - /^feature\/.*$/
    - /^optimization\/.*$/

matrix:
  include:
    - php: 5.4
    - php: 5.5
    - php: 5.6
      env: DEPENDENCIES='low'
    - php: 5.6
    - php: 7.0
    - php: 7.1
    - php: 7.2
    - php: 7.3
    - php: 5.3
      dist: precise
  fast_finish: true

install:
  - export COMPOSER_ROOT_VERSION=dev-master
  - if [ "$DEPENDENCIES" != "low" ]; then composer update; fi;
  - if [ "$DEPENDENCIES" == "low" ]; then composer update --prefer-lowest; fi;

script:
  - vendor/bin/phpspec run -fpretty -v
  - vendor/bin/phpunit
