language: php
sudo: false

## Cache composer bits
cache:
  directories:
    - $HOME/.composer/cache

## PHP versions we test against
php:
  - 7.0
  - 7.1
  - nightly

## Environment variables
env:
  - coverage=true

## Build matrix for lowest and highest possible targets
matrix:
  include:
    - php: 7.0
      env:
        - dependencies=lowest
        - coverage=false
    - php: 7.1
      env:
        - dependencies=lowest
        - coverage=false
    - php: nightly
      env:
        - dependencies=lowest
        - coverage=false
    - php: 7.0
      env:
        - dependencies=highest
        - coverage=false
    - php: 7.1
      env:
        - dependencies=highest
        - coverage=false
    - php: nightly
      env:
        - dependencies=highest
        - coverage=false

## Install or update dependencies
install:
  - if [ -z "$dependencies" ]; then composer install --prefer-dist; fi;
  - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n -vvv --profile; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
  - composer show

## Run the actual test
script:
  - if [ "$coverage" = "false" ]; then make ci; fi;
  - if [ "$coverage" = "true" ]; then make ci-with-coverage; fi;

## Gather coverage and set it to coverage servers
after_script: make ci-coverage

language: php
sudo: false

## Cache composer bits
cache:
  directories:
    - $HOME/.composer/cache

## PHP versions we test against
php:
  - 7.0
  - 7.1
  - nightly

## Environment variables
env:
  - coverage=true

## Build matrix for lowest and highest possible targets
matrix:
  include:
    - php: 7.0
      env:
        - dependencies=lowest
        - coverage=false
    - php: 7.1
      env:
        - dependencies=lowest
        - coverage=false
    - php: nightly
      env:
        - dependencies=lowest
        - coverage=false
    - php: 7.0
      env:
        - dependencies=highest
        - coverage=false
    - php: 7.1
      env:
        - dependencies=highest
        - coverage=false
    - php: nightly
      env:
        - dependencies=highest
        - coverage=false

## Install or update dependencies
install:
  - if [ -z "$dependencies" ]; then composer install --prefer-dist; fi;
  - if [ "$dependencies" = "lowest" ]; then phpenv config-rm xdebug.ini; fi;
  - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n -vvv --profile; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
  - composer show

## Run the actual test
script:
  - if [ "$coverage" = "false" ]; then make ci; fi;
  - if [ "$coverage" = "true" ]; then make ci-with-coverage; fi;

## Gather coverage and set it to coverage servers
after_script: make ci-coverage

Disable xdebug on builds that don't need coverage
Disable xdebug on builds that don't need coverage
