Skip to content

Commit

Permalink
bug #22 Update Travis configuration (sstok)
Browse files Browse the repository at this point in the history
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
sstok committed Feb 11, 2017
2 parents 5234049 + b4c4b9b commit 0b0e028
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 179 deletions.
56 changes: 22 additions & 34 deletions .travis.yml
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
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
}
],
"require": {
"php": "^7.0",
"symfony/process": "~3.1.6",
"symfony/event-dispatcher": "~3.1.6",
"symfony/filesystem": "~3.1.6",
"php": "^7.1",
"symfony/process": "~3.2.3",
"symfony/event-dispatcher": "~3.2.3",
"symfony/filesystem": "~3.2.3",
"symfony/console": "^3.2@dev",
"webmozart/console": "dev-master@dev",
"pimple/pimple": "^3.0",
Expand All @@ -25,8 +25,8 @@
},
"require-dev": {
"phpunit/phpunit": "^5.6",
"symfony/phpunit-bridge": "^3.1.6",
"symfony/debug": "^3.1.6",
"symfony/phpunit-bridge": "^3.2.3",
"symfony/debug": "^3.2.3",
"sllh/php-cs-fixer-styleci-bridge": "^2.1.1"
},
"autoload": {
Expand Down
Loading

0 comments on commit 0b0e028

Please sign in to comment.