sudo: false
language: php

php:
  - 7.2
  - 7.1
  - 7.0
  - 5.6
  - 5.5

env:
  - TWIG_VERSION=~1.3
  - TWIG_VERSION=~2.0

matrix:
  fast_finish: true
  exclude:
    - php: 5.6
      env: "TWIG_VERSION=~2.0"
    - php: 5.5
      env: "TWIG_VERSION=~2.0"

before_script:
  - git clone --depth=50 --branch=2018.07 git://github.com/aimeos/aimeos-core.git ../aimeos-core
  - cd ../aimeos-core
  - mv ../ai-twig ext/
  - travis_retry composer require "twig/twig:${TWIG_VERSION}"

script:
  - vendor/bin/phing -Ddir=ext/ai-twig coverageext checkext

after_success:
  - php vendor/bin/coveralls -c ext/ai-twig/.coveralls.yml
