language: php
sudo: false

php:
    - 5.3

env:
    - DB=MYSQL CORE_RELEASE=3.1

matrix:
  include:
    - php: 5.5
      env: DB=PGSQL CORE_RELEASE=3.1
    - php: 5.6
      env: DB=SQLITE CORE_RELEASE=3.2
    - php: 5.6
      env: DB=SQLITE CORE_RELEASE=master
    - php: 5.4
      env: DB=SQLITE CORE_RELEASE=3.1 COVERAGE=1

before_script:
  - composer self-update
  - phpenv rehash
  - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
  - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
  - cd ~/builds/ss

script:
  - "if [ \"$COVERAGE\" = \"\" ]; then phpunit -c omnipay/phpunit.xml.dist; fi"
  - "if [ \"$COVERAGE\" = \"1\" ]; then phpunit -c omnipay/phpunit.xml.dist --coverage-clover ~/builds/ss/omnipay/coverage.clover; fi"

after_script: ./omnipay/tests/travis/upload_coverage.sh

language: php
sudo: false

php:
    - 5.3

env:
    - DB=MYSQL CORE_RELEASE=3.1

matrix:
  include:
    - php: 5.5
      env: DB=PGSQL CORE_RELEASE=3.1
    - php: 5.6
      env: DB=SQLITE CORE_RELEASE=3.2
    - php: 5.6
      env: DB=SQLITE CORE_RELEASE=3.4
    - php: 5.6
      env: DB=PGSQL CORE_RELEASE=master
    - php: 5.4
      env: DB=SQLITE CORE_RELEASE=3.1 COVERAGE=1
  allow_failures:
    - env: DB=PGSQL CORE_RELEASE=master

before_script:
  - composer self-update
  - phpenv rehash
  - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
  - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
  - cd ~/builds/ss

script:
  - "if [ \"$COVERAGE\" = \"\" ]; then phpunit -c omnipay/phpunit.xml.dist; fi"
  - "if [ \"$COVERAGE\" = \"1\" ]; then phpunit -c omnipay/phpunit.xml.dist --coverage-clover ~/builds/ss/omnipay/coverage.clover; fi"

after_script: ./omnipay/tests/travis/upload_coverage.sh

Allow failure of tests against core-master
Allow failure of tests against core-master
