-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
47 lines (38 loc) · 1.65 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
language: php
sudo: false
git:
depth: 3
env:
- COMPOSER_FLAGS="--prefer-stable --prefer-source"
php:
- 5.6
- 7.0
- 7.1
- nightly
matrix:
fast_finish: true
include:
- php: 5.6
env:
- COMPOSER_FLAGS="--prefer-lowest --prefer-stable --prefer-source"
- php: 5.6
env:
- TEST_VERSION=true
- COMPOSER_FLAGS="--prefer-stable --prefer-source"
allow_failures:
- php: nightly
before_install:
- if [[ "$TRAVIS_PHP_VERSION" != "5.6" ]]; then echo "extension = mongodb.so" >> /home/travis/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
- if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then echo "extension = mongo.so" >> /home/travis/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
- if [[ $TEST_VERSION != true && -f "/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini" ]]; then phpenv config-rm xdebug.ini; fi
- composer global require hirak/prestissimo
- composer self-update --stable --no-progress
install:
- if [[ "$TRAVIS_PHP_VERSION" != "5.6" ]]; then travis_retry composer require alcaeus/mongo-php-adapter $COMPOSER_GLOBAL_FLAGS --ignore-platform-reqs ; fi
- travis_retry composer update $COMPOSER_FLAGS --no-interaction --no-scripts --no-progress
- if [[ $TEST_VERSION ]]; then travis_retry composer require php-coveralls/php-coveralls $COMPOSER_FLAGS --no-interaction --no-scripts --no-progress ; fi
script:
- if [[ $TEST_VERSION == true ]]; then composer qa & composer phpunit-clover ; fi
- if [[ $TEST_VERSION != true ]]; then composer phpunit ; fi
after_script:
- if [[ $TEST_VERSION == true ]]; then travis_retry php vendor/bin/coveralls --verbose ; fi