-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
50 lines (40 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
language: php
services:
- redis-server
- riak
- mongodb
branches:
only:
- master
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
matrix:
include:
- php: 5.3
- php: 5.4
- php: 5.5
- php: 5.6
- php: hhvm
- php: nightly
- php: 7.0
env: COVERAGE=yes
- php: 7.0
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
allow_failures:
- php: hhvm
- php: nightly
fast_finish: true
before_install:
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- if [[ $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PHP_VERSION != 5.3 ]]; then pecl install -f mongodb; echo "extension=mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- if [[ $TRAVIS_PHP_VERSION != hhvm && $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini; fi;
- if [[ $TRAVIS_REPO_SLUG = webmozart/key-value-store ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
- composer self-update
install:
# mongodb/mongodb is not compatible with HHVM/5.3
- if [[ $TRAVIS_PHP_VERSION = hhvm || $TRAVIS_PHP_VERSION = 5.3 ]]; then composer remove --dev mongodb/mongodb; fi
- composer update $COMPOSER_FLAGS --prefer-dist --no-interaction
script: if [[ $COVERAGE = yes ]]; then vendor/bin/phpunit --verbose --coverage-clover=coverage.clover; else vendor/bin/phpunit --verbose; fi
after_script: if [[ $COVERAGE = yes ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi