This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
/
.travis.yml
116 lines (106 loc) · 4.15 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
language: php
cache:
directories:
- $HOME/.composer/cache
services:
- memcached
- mongodb
- redis-server
addons:
apt:
packages:
- rabbitmq-server
env:
global:
- COMPOSER_ARGS="--no-interaction --no-plugins"
- COVERAGE_DEPS="php-coveralls/php-coveralls"
- TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED=true
- TESTS_ZEND_DIAGNOSTICS_MONGO_ENABLED=true
- TESTS_ZEND_DIAGNOSTICS_RABBITMQ_ENABLED=true
- TESTS_ZEND_DIAGNOSTICS_REDIS_ENABLED=true
matrix:
include:
- php: 5.6
env:
- DEPS=lowest
- MONGO_LEGACY=true
- TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED=false
- TESTS_ZEND_DIAGNOSTICS_MEMCACHE_ENABLED=true
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=false
- php: 5.6
env:
- DEPS=locked
- MONGO_LEGACY=true
- LEGACY_DEPS="doctrine/migrations phpunit/phpunit sensiolabs/security-checker symfony/yaml"
- TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED=false
- TESTS_ZEND_DIAGNOSTICS_MEMCACHE_ENABLED=true
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=false
- php: 5.6
env:
- DEPS=latest
- MONGO_LEGACY=true
- TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED=false
- TESTS_ZEND_DIAGNOSTICS_MEMCACHE_ENABLED=true
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=false
- php: 7
env:
- DEPS=lowest
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
- php: 7
env:
- DEPS=latest
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
- php: 7.1
env:
- DEPS=lowest
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
- php: 7.1
env:
- DEPS=latest
- CS_CHECK=true
- TEST_COVERAGE=true
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
- php: 7.2
env:
- DEPS=lowest
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
- php: 7.2
env:
- DEPS=latest
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
- php: 7.3
env:
- DEPS=lowest
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
- php: 7.3
env:
- DEPS=locked
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
- php: 7.3
env:
- DEPS=latest
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=true
before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- if [[ $TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED == 'true' ]]; then echo "extension = apcu.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
- if [[ $TESTS_ZEND_DIAGNOSTICS_MEMCACHE_ENABLED == 'true' ]]; then yes|CFLAGS="-fgnu89-inline" pecl install -f memcache ; fi
- if [[ $TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED == 'true' ]]; then echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
- if [[ $MONGO_LEGACY == 'true' ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
- if [[ $MONGO_LEGACY != 'true' ]]; then pecl upgrade mongodb ; fi
- if [[ $MONGO_LEGACY != 'true' ]]; then echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $MONGO_LEGACY != 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS mongodb/mongodb ; fi
- stty cols 120 && php -m
- stty cols 120 && composer show
script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer run-script test-coverage -- --verbose ; else composer run-script test -- --verbose ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry vendor/bin/php-coveralls -v ; fi
notifications:
email: false