forked from FriendsOfSymfony/FOSElasticaBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (35 loc) · 1.42 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
language: php
cache:
directories:
- $HOME/.composer/cache
dist: trusty
sudo: required
php:
- 5.6
- 7.0
- 7.1
matrix:
include:
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest --prefer-stable"
- php: 5.6
env: SYMFONY_VERSION='2.8.*'
- php: 7.1
env: SYMFONY_VERSION='2.8.*'
fast_finish: true
before_script:
- curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.2.1.deb
- sudo dpkg -i --force-confnew elasticsearch-5.2.1.deb
- sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install -b mapper-attachments
- sudo service elasticsearch restart
- phpenv config-add travis.php.ini
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
- sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony=$SYMFONY_VERSION; fi;'
- if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
- composer update $COMPOSER_FLAGS --prefer-dist
script:
- vendor/bin/phpunit --coverage-clover=coverage.clover
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover