forked from zendframework/zend-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
196 lines (177 loc) · 7.53 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
sudo: false
language: php
branches:
except:
- /^release-.*$/
- /^ghgfk-.*$/
cache:
directories:
- $HOME/.composer/cache
- $HOME/.local
- zf-mkdoc-theme
services:
- memcached
- mongodb
- redis-server
env:
global:
- TESTS_ZEND_CACHE_APC_ENABLED=true
- TESTS_ZEND_CACHE_APCU_ENABLED=true
- TESTS_ZEND_CACHE_FILESYSTEM_DIR=/dev/shm
- TESTS_ZEND_CACHE_MEMCACHED_ENABLED=true
- TESTS_ZEND_CACHE_MEMCACHED_HOST="127.0.0.1"
- TESTS_ZEND_CACHE_MEMCACHED_PORT=11211
- TESTS_ZEND_CACHE_MEMCACHE_ENABLED=true
- TESTS_ZEND_CACHE_MEMCACHE_HOST=$TESTS_ZEND_CACHE_MEMCACHED_HOST
- TESTS_ZEND_CACHE_MEMCACHE_PORT=$TESTS_ZEND_CACHE_MEMCACHED_PORT
- TESTS_ZEND_CACHE_MONGODB_ENABLED=true
- TESTS_ZEND_CACHE_REDIS_ENABLED=true
- TESTS_ZEND_CACHE_REDIS_HOST="127.0.0.1"
- TESTS_ZEND_CACHE_REDIS_PORT=6379
- TESTS_ZEND_CACHE_REDIS_PASSWORD=""
- TESTS_ZEND_CACHE_REDIS_DATABASE=0
- TESTS_ZEND_CACHE_XCACHE_ENABLED=true
- TESTS_ZEND_CACHE_XCACHE_ADMIN_AUTH=true
- TESTS_ZEND_CACHE_XCACHE_ADMIN_USER=travis
- TESTS_ZEND_CACHE_XCACHE_ADMIN_PASS=test
- SITE_URL="https://zendframework.github.io/zend-cache"
- GH_USER_NAME="Matthew Weier O'Phinney"
- GH_USER_EMAIL="[email protected]"
- GH_REF="github.com/zendframework/zend-cache.git"
- secure: "ZYYlfFWTde5MCn6twsm/+s+mx4bLEaVFFG+tuaeiz7nCx+z495D6FxruzBbY1zheX9rNo9qReDo0Tyfn2wrUH8SJYbR9iKDqB95GPDDPW+I23Mw3Uuddr8XqbtabTJVqEQg6iAu7IIQG4TvFFmdq/g26jWim8Cngg/5zZh4Q2GuLSjIKRJBpLe7mSTjQVqaApS/a8wmvPJiSoqxWmY8Botc88ZXMmkRDPQoqEdZOeS4i029cGMXUnzGj7Vl7qwfol6Yj/R441Hd84Vt8P8BOdRyW0tjmllXLXJUYFKCcP5fEqIujbU68FwJMidCPzBcXv2N0klW43ViVwdJD6gBgZStwOyENGeEw1VcbZ6JReMa68F1mtqLhBhZtF8WRUI8+TYMYmLPGMVTcets4P3nIB18uX1CittwGDD2y2OL8MDvuIuaSQFoj/PdUb+BC/DvvmtPGnF6MLTAUjqNlxYbmzopufDEtivWHsqeyxHZj0L0HD5KkMslD9wnngfi+lcQ5e3iFQe/H5vQKE0BfooukxErIXk00cwwMoMjFY4v95CS0BKFhA4HMclKpGEA94CH4STxwyD2Nz/z6iGPqkZuzqDLOKhLr2FsY7bFbvEdNu57G3PGahtYJtc31lcnwKf2t1ALGcG9LS0/ezJSzqx659hWL0B5qgHjCNDnAyKJcNxM="
matrix:
include:
- php: 5.5
env:
- DEPS=lowest
- APCU_PECL_VERSION="apcu-4.0.8"
- php: 5.5
env:
- DEPS=locked
- APCU_PECL_VERSION="apcu-4.0.10"
- php: 5.5
env:
- DEPS=latest
- APCU_PECL_VERSION="apcu-4.0.11"
- php: 5.6
env:
- DEPS=lowest
- APCU_PECL_VERSION="apcu-4.0.8"
- php: 5.6
env:
- DEPS=locked
- APCU_PECL_VERSION="apcu-4.0.10"
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- PATH="$HOME/.local/bin:$PATH"
- php: 5.6
env:
- DEPS=latest
- TEST_COVERAGE=true
- APCU_PECL_VERSION="apcu-4.0.11"
- php: 7
env:
- DEPS=lowest
- APCU_PECL_VERSION="apcu-5.1.2"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.0"
# TODO: re-enable these extentions as soon as they are available and stable on php 7
- TESTS_ZEND_CACHE_MEMCACHE_ENABLED=false
- TESTS_ZEND_CACHE_MEMCACHED_ENABLED=false
- TESTS_ZEND_CACHE_MONGODB_ENABLED=false
- TESTS_ZEND_CACHE_XCACHE_ENABLED=false
- php: 7
env:
- DEPS=locked
- CHECK_CS=true
- APCU_PECL_VERSION="apcu-5.1.3"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.2"
# TODO: re-enable these extentions as soon as they are available and stable on php 7
- TESTS_ZEND_CACHE_MEMCACHE_ENABLED=false
- TESTS_ZEND_CACHE_MEMCACHED_ENABLED=false
- TESTS_ZEND_CACHE_MONGODB_ENABLED=false
- TESTS_ZEND_CACHE_XCACHE_ENABLED=false
- php: 7
env:
- DEPS=latest
- APCU_PECL_VERSION="apcu" # PECL will download the latest stable version available
- APCU_BC_PECL_VERSION="apcu_bc-beta" # TODO: change this as soon there is a stable version available
# TODO: re-enable these extentions as soon as they are available and stable on php 7
- TESTS_ZEND_CACHE_MEMCACHE_ENABLED=false
- TESTS_ZEND_CACHE_MEMCACHED_ENABLED=false
- TESTS_ZEND_CACHE_MONGODB_ENABLED=false
- TESTS_ZEND_CACHE_XCACHE_ENABLED=false
- php: hhvm
env:
- DEPS=lowest
- TESTS_ZEND_CACHE_XCACHE_ENABLED=false
- TESTS_ZEND_CACHE_APCU_ENABLED=false
- php: hhvm
env:
- DEPS=locked
- TESTS_ZEND_CACHE_XCACHE_ENABLED=false
- TESTS_ZEND_CACHE_APCU_ENABLED=false
- php: hhvm
env:
- DEPS=latest
- TESTS_ZEND_CACHE_XCACHE_ENABLED=false
- TESTS_ZEND_CACHE_APCU_ENABLED=false
allow_failures:
- php: hhvm
notifications:
irc: "irc.freenode.org#zftalk.dev"
email: false
before_install:
- if [[ $TRAVIS_PHP_VERSION != "hhvm" && $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini ; fi
install:
# prevent PECL from enabling the extension by default, see https://pear.php.net/bugs/bug.php?id=21007
- if [[ $APCU_PECL_VERSION != '' ]]; then
echo "yes\nno\n" | pecl install $APCU_PECL_VERSION
&& sed -i 's/extension="apcu.so"//' ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ;
fi
- if [[ $APCU_BC_PECL_VERSION != '' ]]; then
pecl install $APCU_BC_PECL_VERSION
&& sed -i 's/extension="apc.so"//' ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ;
fi
- if [[ $TESTS_ZEND_CACHE_XCACHE_ENABLED == 'true' ]]; then
git clone https://github.com/lighttpd/xcache.git
&& (
cd xcache
&& git checkout $(git rev-list --tags --max-count=1)
&& phpize && ./configure --enable-xcache && make install
);
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 [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS satooshi/php-coveralls:^1.0 ; fi
- travis_retry composer install $COMPOSER_ARGS
- composer show
before_script:
- if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then
if [[ $APCU_PECL_VERSION != '' && $APCU_BC_PECL_VERSION == '' ]]; then
phpenv config-add .ci/apcu.ini ;
elif [[ $APCU_BC_PECL_VERSION != '' ]]; then
phpenv config-add .ci/apcu_bc.ini ;
fi ;
if [[ $TESTS_ZEND_CACHE_REDIS_ENABLED == 'true' ]]; then
phpenv config-add .ci/redis.ini ;
fi ;
if [[ $TESTS_ZEND_CACHE_MEMCACHE_ENABLED == 'true' ]]; then
phpenv config-add .ci/memcache.ini ;
fi ;
if [[ $TESTS_ZEND_CACHE_MEMCACHED_ENABLED == 'true' ]]; then
phpenv config-add .ci/memcached.ini ;
fi ;
if [[ $TESTS_ZEND_CACHE_MONGODB_ENABLED == 'true' ]]; then
phpenv config-add .ci/mongo.ini ;
fi ;
if [[ $TESTS_ZEND_CACHE_XCACHE_ENABLED == 'true' ]]; then
phpenv config-add .ci/xcache.ini ;
fi ;
fi
script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer run-script test-coverage --timeout=400 -- --verbose ; else composer run-script test --timeout=300 -- --verbose ; fi
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then travis_retry curl -sSL https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh | bash ; fi
after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer upload-coverage ; fi
after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then ./zf-mkdoc-theme/deploy.sh ; fi