-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
62 lines (53 loc) · 1.68 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
dist: focal
language: php
addons:
chrome: stable
cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.npm"
matrix:
fast_finish: true
include:
- php: 7.4
- php: 7.4
env: COVERAGE=yes
services:
- mongodb
before_install:
- phpenv config-add etc/travis/phpenv.ini
- sudo apt-get update > /dev/null
- sudo apt-get install libcurl4-openssl-dev libcurl4
- cd /usr/include
- sudo ln -s x86_64-linux-gnu/curl
- cd /home/travis/build/yawik/Solr
- echo '' | pecl install solr
- pecl install mongodb
- pecl channel-update pecl.php.net
- if [[ $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi;
install:
# TODO: change to --prefer-dist when CoreTestUtils is installable
- COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-source
before_script:
# behat preparation
- 'if [[ $COVERAGE != yes ]]; then
composer run start-selenium --timeout=0 > /dev/null 2>&1 &
sleep 5;
composer run serve --timeout=0 > /dev/null 2>&1 &
sleep 3;
fi'
script:
- 'if [[ $COVERAGE = yes ]]; then
./vendor/bin/phpunit --verbose --coverage-clover=build/logs/clover.xml --coverage-php=build/logs/clover.serialized;
else
./vendor/bin/phpunit --verbose;
fi'
- if [[ $COVERAGE != yes ]]; then ./vendor/bin/behat; fi;
after_script:
# process coverage
- 'if [[ $COVERAGE = yes ]]; then
COMPOSER_MEMORY_LIMIT=-1 composer require php-coveralls/php-coveralls --no-scripts;
travis_retry ./vendor/bin/php-coveralls -vvv;
wget https://scrutinizer-ci.com/ocular.phar;
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.serialized;
fi'