forked from pucene/old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (34 loc) · 1.46 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
sudo: false
language: php
php:
- '7.0'
env:
global:
- COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction"
- CODE_COVERAGE="--coverage-clover=coverage.clover"
- ES_VERSION=2.4.4
- ES_DOWNLOAD_URL=https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/${ES_VERSION}/elasticsearch-${ES_VERSION}.tar.gz
cache:
directories:
- "vendor"
- "$HOME/.composer/cache"
before_install:
- if [[ -z $CODE_COVERAGE ]]; then phpenv config-rm xdebug.ini ; fi
- composer self-update
- wget ${ES_DOWNLOAD_URL}
- tar -xzf elasticsearch-${ES_VERSION}.tar.gz
- ./elasticsearch-${ES_VERSION}/bin/elasticsearch > elasticsearch.log 2>&1 &
- wget -q --waitretry=1 --retry-connrefused -T 10 -O - http://127.0.0.1:9200
install:
- travis_retry composer update
- ./tests/bin/console elasticsearch:indices:create -e prod
- ./tests/bin/console test:import:json my_index ./tests/app/data.json --adapter elasticsearch -e prod
- ./tests/bin/console doctrine:database:create -e prod
- ./tests/bin/console pucene:indices:create -e prod
- ./tests/bin/console test:import:json my_index ./tests/app/data.json --adapter pucene -e prod
script:
- ./vendor/bin/phpunit $CODE_COVERAGE
after_script:
- cat elasticsearch.log
- if [[ -n $CODE_COVERAGE ]]; then wget https://scrutinizer-ci.com/ocular.phar ; fi
- if [[ -n $CODE_COVERAGE ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover ; fi