-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #22 Update Travis configuration (sstok)
This PR was merged into the 1.0-dev branch. Discussion ---------- Note that coveralls is currently disabled because of Segfaults with phpdbg. Support PHP 7.0 is dropped, PHP 7.1 is the minimum now. Commits ------- 99ad1e9 Update Travis configuration 08687e1 Update dependencies and drop support for PHP 7.0 b4c4b9b Fix GitHub service
- Loading branch information
Showing
4 changed files
with
172 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,37 @@ | ||
language: php | ||
|
||
matrix: | ||
include: | ||
- php: 7.0 | ||
- php: 7.1 | ||
fast_finish: true | ||
|
||
sudo: false | ||
|
||
env: | ||
global: | ||
- PATH="$HOME/.composer/vendor/bin:$PATH" | ||
branches: | ||
only: | ||
- master | ||
|
||
matrix: | ||
include: | ||
- php: '7.1' | ||
#env: coverage=1 | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache/files | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- if [[ $TRAVIS_PHP_VERSION = 7.1 ]]; then git clone git://github.com/xdebug/xdebug.git && cd xdebug && phpize && ./configure --enable-xdebug && make && make install && echo "zend_extension = xdebug.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini && cd ..; fi | ||
# From https://github.com/travis-ci/travis-ci/issues/5780#issuecomment-196308406 | ||
- | | ||
XDEBUG_INI="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini" | ||
if [ ! -f "$XDEBUG_INI" ]; then | ||
return | ||
fi | ||
function composer() | ||
{ | ||
mv $XDEBUG_INI ~/xdebug.ini | ||
COMPOSER="$(which composer)" | ||
$COMPOSER "$@" | ||
STATUS=$? | ||
mv ~/xdebug.ini $XDEBUG_INI | ||
return $STATUS | ||
} | ||
- composer self-update | ||
- if [ "$TRAVIS_PHP_VERSION" = "nightly" ]; then COMPOSER_FLAGS="$COMPOSER_FLAGS --ignore-platform-reqs"; fi; | ||
- phpenv config-rm xdebug.ini || echo "xdebug not available" | ||
- if [[ $coverage = 1 ]]; then mkdir -p build/logs build/cov; fi | ||
- if [[ $coverage = 1 ]]; then wget https://phar.phpunit.de/phpcov.phar; fi | ||
- if [[ $coverage = 1 ]]; then wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar; fi | ||
- export PATH="$PATH:$HOME/.composer/vendor/bin" | ||
|
||
install: | ||
- export SYMFONY_DEPRECATIONS_HELPER=strict | ||
- export COMPOSER_ROOT_VERSION=dev-master | ||
- composer global require satooshi/php-coveralls:@stable --prefer-dist --no-interaction | ||
- composer update $COMPOSER_FLAGS --no-interaction --prefer-dist | ||
- if [[ $coverage = 1 ]]; then composer require --dev --no-update 'phpunit/php-code-coverage:^4.0.1'; fi | ||
- if [[ ! $deps ]]; then composer update --prefer-dist --no-progress --no-suggest --ansi; fi | ||
- if [[ $deps = 'dev' ]]; then composer config minimum-stability dev && composer update --prefer-dist --no-progress --no-suggest --ansi ; fi | ||
- if [[ $deps = 'low' ]]; then composer update --prefer-dist --no-progress --no-suggest --prefer-stable --prefer-lowest --ansi; fi | ||
|
||
script: | ||
- vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml --verbose | ||
- if [[ $coverage = 1 ]]; then phpdbg -qrr -dmemory_limit=-1 vendor/bin/phpunit --verbose --coverage-php build/cov/coverage-phpunit.cov; else vendor/bin/phpunit --verbose; fi | ||
- if [[ $coverage = 1 ]]; then phpdbg -qrr phpcov.phar merge --clover build/logs/clover.xml build/cov; fi | ||
|
||
after_script: | ||
- coveralls -v -x build/logs/clover.xml | ||
after_success: | ||
- if [[ $coverage = 1 ]]; then travis_retry php coveralls.phar; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.