forked from yawik/SimpleImport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (68 loc) · 2.2 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
72
73
74
75
76
77
78
79
language: php
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.npm"
env:
global:
- PECLMONGO="mongodb-stable"
matrix:
fast_finish: true
allow_failures:
- php: 7.2
env: COVERAGE=yes
include:
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.2
env: COVERAGE=yes
services:
- mongodb
before_install:
- sudo apt-get update > /dev/null
- "mongo --eval 'db.runCommand({setParameter: 1, textSearchEnabled: true})' admin"
- if [[ $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi;
- pecl channel-update pecl.php.net
install:
# install php packages required for running YAWIK phpunit tests
- pecl install -f ${PECLMONGO}
- phpenv config-add .travis/phpenv.ini
# TODO: change to --prefer-dist when CoreTestUtils become separate packages
- 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'
- mkdir -p build/behat
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;
./vendor/bin/behat;
fi'
after_failure:
- "./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles \"build/behat/*.log\""
- "./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles \"log/*.log\""
- "./vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles \"log/tracy/*.*\""
- "IMGUR_CLIENT_ID=bec050c54e1bb52 ./vendor/bin/imgur-uploader build/behat/*.png"
after_script:
- 'if [[ $COVERAGE = yes ]]; then
composer require php-coveralls/php-coveralls --no-scripts;
travis_retry ./vendor/bin/php-coveralls -vvv;
wget https://scrutinizer-ci.com/ocular.phar;
travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.serialized;
fi'