language: php

php:
  - 5.5
  - 5.6

services: mongodb

before_script:
  - echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - composer install --prefer-source

script:
  - cd tests
  - cp test.application.config.php ../config/application.config.php
  - ../vendor/bin/doctrine-module odm:schema:create
  - ../vendor/bin/doctrine-module odm:schema:drop
  - ../vendor/bin/phpunit

language: php

php:
  - 5.5
  - 5.6

env:
  - MONGO_DRIVER=mongo

matrix:
  include:
    - php: 7.0
      env: ADAPTER_VERSION="^1.0.0" MONGO_DRIVER=mongodb

services: mongodb

before_script:
  - yes '' | pecl -q install -f $MONGO_DRIVER
  - if [ "x${ADAPTER_VERSION}" != "x" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi
  - composer install --prefer-source

script:
  - cd tests
  - cp test.application.config.php ../config/application.config.php
  - ../vendor/bin/doctrine-module odm:schema:create
  - ../vendor/bin/doctrine-module odm:schema:drop
  - ../vendor/bin/phpunit

Add PHP 7 to the build matrix
Add PHP 7 to the build matrix
