language: php
php:
  - 5.4
  - 5.5
  - 5.6
  - 7

env:
  global:
    - CORE_BRANCH=master
  matrix:
    - DB=sqlite

branches:
  only:
    - master
    - /^stable\d+(\.\d+)?$/

before_install:
#  - composer install
  - wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
  - bash ./before_install.sh search_lucene $CORE_BRANCH $DB

script:
  # Test lint
  - cd ../core/apps/search_lucene
  - sh -c "if [ '$DB' = 'sqlite' ]; then ant test; fi"

  # Run phpunit tests
  - cd tests/unit
  - phpunit --configuration phpunit.xml

  # Create coverage report
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover clover.xml

matrix:
  include:
    - php: 5.4
      env: DB=mysql
    - php: 5.4
      env: DB=pgsql
  allow_failures:
    - php: hhvm
  fast_finish: true

language: php
php:
  - 5.6
  - 7.0

env:
  global:
    - CORE_BRANCH=master
  matrix:
    - DB=sqlite

branches:
  only:
    - master
    - /^stable\d+(\.\d+)?$/

before_install:
#  - composer install
  - wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
  - bash ./before_install.sh search_lucene $CORE_BRANCH $DB

script:
  # Test lint
  - cd ../core/apps/search_lucene
  - sh -c "if [ '$DB' = 'sqlite' ]; then ant test; fi"

  # Run phpunit tests
  - cd tests/unit
  - phpunit --configuration phpunit.xml

  # Create coverage report
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover clover.xml

matrix:
  include:
    - php: 5.6
      env: DB=mysql
    - php: 5.6
      env: DB=pgsql
  fast_finish: true

Kill php 5.4 and 5.5
Kill php 5.4 and 5.5