Skip to content

Commit

Permalink
Merge pull request #222 from kbond/code-coverage
Browse files Browse the repository at this point in the history
Add code coverage travis stage
  • Loading branch information
kbond authored Nov 27, 2019
2 parents 4fa1d2b + c0c84ee commit 033231d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
filter:
dependency_paths: [vendor/]
checks:
php: true
tools:
external_code_coverage:
timeout: 900
1 change: 0 additions & 1 deletion .styleci.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
- COMPOSER_MEMORY_LIMIT=-1

before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update
- composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master

Expand Down Expand Up @@ -59,5 +60,19 @@ jobs:
script:
- ./vendor/bin/php-cs-fixer fix -v --dry-run

- stage: Code Coverage
php: 7.3
install:
- composer require --dev "symfony/mailer" --no-update
- travis_retry composer update -n --prefer-dist --prefer-stable
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ./vendor/bin/phpunit -v --coverage-text --coverage-clover=coverage.clover
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

notifications:
slack: liip:3QOs1QKt3aCFxpJvRzpJCbVZ

0 comments on commit 033231d

Please sign in to comment.