Permalink
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (31 sloc) 1.03 KB
language: php
sudo: false
php:
- 5.6
- 7.0
- 7.1
- 7.2
env:
global:
- DRIVER_VERSION="stable"
- ADAPTER_VERSION="^1.0.0"
- COMPOSER_FLAGS="--prefer-dist"
matrix:
include:
- php: 5.6
env: DRIVER_VERSION="1.5.8" COMPOSER_FLAGS="--prefer-dist --prefer-lowest" PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
cache:
directories:
- $HOME/.composer/cache
services: mongodb
install:
- composer self-update
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then yes '' | pecl -q install -f mongo-${DRIVER_VERSION}; fi
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then pecl install -f mongodb-${DRIVER_VERSION}; fi
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then composer config "platform.ext-mongo" "1.6.16" && composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}"; fi
- composer update ${COMPOSER_FLAGS}
script:
- ./vendor/bin/phpunit ${PHPUNIT_FLAGS}
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover