forked from sulu/SuluArticleBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (62 loc) · 2.4 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
sudo: false
dist: trusty
language: php
services:
- mysql
env:
global:
- JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre"
- JACKRABBIT_VERSION=2.12.0
- PHPCR_TRANSPORT=doctrinedbal
- SYMFONY__DATABASE__VERSION=5.5.39
- ES_VERSION="6.5.4"
- ES_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.zip"
cache:
directories:
- "downloads"
- "$HOME/.composer/cache/files"
matrix:
include:
- php: 7.1
env:
- COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction"
- ES_VERSION="5.6.14"
- ES_DOWNLOAD_URL="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.zip"
- php: 7.3
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction"
- PHPCR_TRANSPORT=jackrabbit
- PHPSTAN=true
before_install:
- if [[ -z $CODE_COVERAGE ]]; then phpenv config-rm xdebug.ini ; fi
- phpenv config-add Tests/travis.php.ini
- composer self-update
install:
- if [[ $PHPSTAN == 'true' ]]; then composer require --dev phpstan/phpstan --no-update $COMPOSER_FLAGS ; fi
- composer update $COMPOSER_FLAGS
- composer info -i
- java -version
- |
if [[ $PHPCR_TRANSPORT = jackrabbit ]]; then
if [ ! -f downloads/jackrabbit-standalone-$JACKRABBIT_VERSION.jar ]; then
cd downloads
wget http://archive.apache.org/dist/jackrabbit/$JACKRABBIT_VERSION/jackrabbit-standalone-$JACKRABBIT_VERSION.jar
cd -
fi
java -jar downloads/jackrabbit-standalone-$JACKRABBIT_VERSION.jar &
fi
- curl -L -o elasticsearch.zip ${ES_DOWNLOAD_URL}
- unzip elasticsearch.zip
- ./elasticsearch-*/bin/elasticsearch -d
- wget --waitretry=10 --retry-connrefused -v http://127.0.0.1:9200/
- ./Tests/Application/console doctrine:database:create
- ./Tests/Application/console doctrine:schema:update --force
- ./Tests/Application/console sulu:document:initialize
- ./Tests/Application/console ongr:es:index:create -m default
- ./Tests/Application/console ongr:es:index:create -m live
script:
- ./vendor/bin/phpunit $CODE_COVERAGE
- if [[ $PHPSTAN == 'true' ]]; then ./vendor/bin/phpstan analyse ./ --level 1 -c phpstan.neon ; fi
after_script:
- 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