Skip to content

Instantly share code, notes, and snippets.

@hollodotme
Last active January 14, 2019 10:40
Show Gist options
  • Save hollodotme/1becd28a52a75ea4a120790ca262bf44 to your computer and use it in GitHub Desktop.
Save hollodotme/1becd28a52a75ea4a120790ca262bf44 to your computer and use it in GitHub Desktop.
Using xdebug filter for code coverage on travis-ci
language: php
php:
- 7.1
- 7.2
branches:
only:
- master
- development
- /^feature\/.+$/
before_script:
- composer self-update
- mkdir -p vendor/bin
- composer install -o --prefer-dist --no-interaction
- mkdir build/logs
- echo "<?php xdebug_set_filter(XDEBUG_FILTER_CODE_COVERAGE, XDEBUG_PATH_WHITELIST, [ '$(pwd)/src' ]);" > .xdebug_filter.php
script:
- php -dauto_preprend_file=$(pwd)/.xdebug_filter.php vendor/bin/phpunit.phar -c build/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment