Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit f1b68bb

Browse files
michalbundyraweierophinney
authored andcommitted
Travis CI config: enable php modules before installing packages
Conflicts: .travis.yml
1 parent 6a91722 commit f1b68bb

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

.travis.yml

+20-15
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ install:
114114
- if [[ $APCU_PECL_VERSION != '' ]]; then
115115
echo "yes\nno\n" | pecl install -f $APCU_PECL_VERSION || return 0 ;
116116
sed -i 's/extension="apcu.so"//' ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ;
117-
fi
117+
fi ;
118118

119119
- if [[ $APCU_BC_PECL_VERSION != '' ]]; then
120120
pecl install -f $APCU_BC_PECL_VERSION ;
121121
sed -i 's/extension="apc.so"//' ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ;
122-
fi
122+
fi ;
123123

124124
- if [[ $TESTS_ZEND_CACHE_XCACHE_ENABLED == 'true' ]]; then
125125
git clone https://github.com/lighttpd/xcache.git
@@ -128,37 +128,42 @@ install:
128128
&& git checkout $(git rev-list --tags --max-count=1)
129129
&& phpize && ./configure --enable-xcache && make install
130130
);
131-
fi
132-
133-
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
134-
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
135-
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
136-
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
137-
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
138-
- stty cols 120 && composer show
131+
fi ;
139132

140-
before_script:
141133
- if [[ $APCU_PECL_VERSION != '' && $APCU_BC_PECL_VERSION == '' ]]; then
142134
phpenv config-add .ci/apcu.ini ;
143135
elif [[ $APCU_BC_PECL_VERSION != '' ]]; then
144136
phpenv config-add .ci/apcu_bc.ini ;
145137
fi ;
146-
if [[ $TESTS_ZEND_CACHE_REDIS_ENABLED == 'true' ]]; then
138+
139+
- if [[ $TESTS_ZEND_CACHE_REDIS_ENABLED == 'true' ]]; then
147140
phpenv config-add .ci/redis.ini ;
148141
fi ;
149-
if [[ $TESTS_ZEND_CACHE_MEMCACHE_ENABLED == 'true' ]]; then
142+
143+
- if [[ $TESTS_ZEND_CACHE_MEMCACHE_ENABLED == 'true' ]]; then
150144
phpenv config-add .ci/memcache.ini ;
151145
fi ;
152-
if [[ $TESTS_ZEND_CACHE_MEMCACHED_ENABLED == 'true' ]]; then
146+
147+
- if [[ $TESTS_ZEND_CACHE_MEMCACHED_ENABLED == 'true' ]]; then
153148
phpenv config-add .ci/memcached.ini ;
154149
fi ;
150+
155151
if [[ $TESTS_ZEND_CACHE_MONGODB_ENABLED == 'true' ]]; then
156152
phpenv config-add .ci/mongo.ini ;
157153
fi ;
158-
if [[ $TESTS_ZEND_CACHE_XCACHE_ENABLED == 'true' ]]; then
154+
155+
- if [[ $TESTS_ZEND_CACHE_XCACHE_ENABLED == 'true' ]]; then
159156
phpenv config-add .ci/xcache.ini ;
160157
fi ;
161158

159+
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
160+
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
161+
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
162+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
163+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
164+
- if [[ $TESTS_ZEND_CACHE_MONGODB_ENABLED == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $MONGODB_DEPS ; fi
165+
- stty cols 120 && composer show
166+
162167
script:
163168
- if [[ $TEST_COVERAGE == 'true' ]]; then composer run-script test-coverage --timeout=400 -- --verbose ; else composer run-script test --timeout=300 -- --verbose ; fi
164169
- if [[ $BENCHMARKS == 'true' ]]; then vendor/bin/phpbench run --revs=2 --iterations=2 --report=aggregate ; fi

0 commit comments

Comments
 (0)