language: php

sudo: false

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

php:
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

env:
    global:
      - TASKWARRIOR=2.4.4
    matrix:
      - PREFER_LOWEST="--prefer-lowest"
      - PREFER_LOWEST=""

matrix:
  include:
      - php: 5.6
        env: TASKWARRIOR=2.4.3
      - php: 5.6
        env: TASKWARRIOR=2.5.0.beta3
  allow_failures:
      - php: 7
      - php: hhvm
      - php: 5.6
        env: TASKWARRIOR=2.5.0.beta3

before_install:
  - composer self-update

install:
  - ln -s build/taskwarrior-$TASKWARRIOR task
  - chmod +x ./task
  - ./task --version

before_script:
    - composer update $PREFER_LOWEST

