forked from yiisoft/yii2-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
50 lines (41 loc) · 1.19 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
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- nightly
- hhvm
services:
- docker
# faster builds on new travis setup not using sudo
sudo: required
# cache vendor dirs
cache:
directories:
- $HOME/.composer/cache
before_install:
- docker pull elasticsearch:5.1
- docker run -p 9200:9200 -d elasticsearch:5.1 -Etransport.host=127.0.0.1 -Ehttp.publish_host=127.0.0.1
install:
- travis_retry composer self-update && composer --version
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
- travis_retry composer global require "fxp/composer-asset-plugin:^1.3.1"
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install --prefer-source --no-interaction
before_script:
- echo 'elasticsearch version ' && curl http://localhost:9200/
- |
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
fi
script:
- phpunit --verbose $PHPUNIT_FLAGS
after_script:
- |
if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi