language: php

sudo: false

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

addons:
  apt_packages:
    - nodejs

matrix:
  fast_finish: true
  allow_failures:
    - php: hhvm
    - php: 7.0

php:
  - 5.5
  - 5.6
  - 7.0
  - hhvm

env:
  - MOCK_SERVER_PORT=3000

before_install:
  - pushd $TRAVIS_BUILD_DIR/features/bootstrap/server
  - travis_retry npm install
  - nohup node server.js &
  - popd

before_script:
  - travis_retry composer self-update
  - travis_retry composer install --prefer-dist

script:
  - ./vendor/bin/php-cs-fixer fix --dry-run --verbose
  - ./vendor/bin/phpspec run -fprogress
  - ./vendor/bin/behat -fprogress

language: php

sudo: false

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

addons:
  apt_packages:
    - nodejs

matrix:
  fast_finish: true
  include:
    - php: 5.5
      env: dependencies=lowest
    - php: 7.0
      env: dependencies=highest
  allow_failures:
    - php: hhvm

php:
  - 5.5
  - 5.6
  - 7.0
  - hhvm

env:
  - MOCK_SERVER_PORT=3000

before_install:
  - pushd $TRAVIS_BUILD_DIR/features/bootstrap/server
  - travis_retry npm install
  - nohup node server.js &
  - popd

before_script:
  - composer self-update
  - if [ -z "$dependencies" ]; then composer install --prefer-dist -n; fi;
  - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;

script:
  - ./vendor/bin/phpspec run -fprogress
  - ./vendor/bin/behat -fprogress

after_script:
  - ./vendor/bin/php-cs-fixer fix --dry-run --verbose

Test again lowest and highest dependencies
Test again lowest and highest dependencies
