language: php
sudo: false

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

## PHP versions we test against
php:
  - 7
  - hhvm

## Build matrix for lowest and highest possible targets
matrix:
  include:
    - php: 7
      env: dependencies=lowest
    - php: hhvm
      env: dependencies=lowest
    - php: 7
      env: dependencies=highest
    - php: hhvm
      env: dependencies=highest

## Update composer and run the appropriate composer command
before_script:
  - composer self-update
  - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
  - if [ -z "$dependencies" ]; then composer install; fi;
  - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest -n; fi;
  - if [ "$dependencies" = "highest" ]; then composer update -n; fi;
  - composer show -i

## Run the actual test
script: make travis

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

notifications:
  webhooks:
    urls:
      - http://wyrihaximus.net/wyri_projects/wyri_projects/webhook/travisci.json
    on_success: always
    on_failure: always
    on_start: true

language: php
sudo: false

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

## PHP versions we test against
php:
  - 7
  - hhvm

## Build matrix for lowest and highest possible targets
matrix:
  include:
    - php: 7
      env: dependencies=lowest
    - php: hhvm
      env: dependencies=lowest
    - php: 7
      env: dependencies=highest
    - php: hhvm
      env: dependencies=highest
  allow_failures:
    - php: hhvm

## Update composer and run the appropriate composer command
before_script:
  - composer self-update
  - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
  - if [ -z "$dependencies" ]; then composer install; fi;
  - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest -n; fi;
  - if [ "$dependencies" = "highest" ]; then composer update -n; fi;
  - composer show -i

## Run the actual test
script: make travis

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

notifications:
  webhooks:
    urls:
      - http://wyrihaximus.net/wyri_projects/wyri_projects/webhook/travisci.json
    on_success: always
    on_failure: always
    on_start: true

Allow HHVM to fail untill they support PHP 7
Allow HHVM to fail untill they support PHP 7
