forked from FriendsOfSymfony/FOSElasticaBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (38 loc) · 1.66 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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 5.6
env: ES_VERSION=5.2.1
- php: 7.0
env: ES_VERSION=5.2.1
- php: 7.1
env: ES_VERSION=5.2.1
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest --prefer-stable" ES_VERSION=5.2.1
- php: 5.6
env: SYMFONY_VERSION='2.8.*' ES_VERSION=5.2.1
- php: 7.1
env: SYMFONY_VERSION='2.8.*' ES_VERSION=5.2.1
fast_finish: true
install:
- mkdir /tmp/elasticsearch
- wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1
- /tmp/elasticsearch/bin/elasticsearch-plugin install -b mapper-attachments
- /tmp/elasticsearch/bin/elasticsearch --daemonize -Epath.data=/tmp
- .travis/wait-for-elasticsearch.sh
before_script:
- 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