-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
25 lines (22 loc) · 1.57 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
before_script:
- composer self-update
- (echo 'no' | pecl install redis) || true
- (php -m | grep 'redis') || echo "extension = redis.so" > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/redis.ini
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "5." ]]; then echo 'no' | pecl install mongo; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then pecl install mongodb; composer config "platform.ext-mongo" "1.6.16" && COMPOSER_MEMORY_LIMIT=-1 composer require alcaeus/mongo-php-adapter; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then pecl install mongodb; composer config "platform.ext-mongo" "1.6.16" && COMPOSER_MEMORY_LIMIT=-1 composer require alcaeus/mongo-php-adapter; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]] || [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]] || [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" ]]; then pecl install mongodb; echo 'extension = mongodb.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini && echo "composer config" && composer config "platform.ext-mongo" "1.6.16" && echo "composer require" && COMPOSER_MEMORY_LIMIT=-1 composer require alcaeus/mongo-php-adapter; echo "composer require done"; fi
- echo "composer install"
- COMPOSER_MEMORY_LIMIT=-1 composer install
script:
- bin/phpunit --coverage-clover=coverage.clover --log-junit=phpunit.result.xml && touch build_passed
- if [ -f build_passed ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ -f build_passed ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi