Skip to content

Commit

Permalink
tests coverage: coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
fprochazka committed Aug 25, 2016
1 parent 9f32371 commit 9e8e295
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .travis.yml
Expand Up @@ -45,10 +45,21 @@ install:
- travis_retry composer create-project --no-interaction jakub-onderka/php-parallel-lint /tmp/php-parallel-lint
- travis_retry composer create-project --no-interaction kdyby/code-checker /tmp/code-checker

before_script:
- if [ $TRAVIS_PHP_VERSION == "7.0" ]; then COVERAGE="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi

script:
- vendor/bin/tester -s -p php -c ./tests/php.ini-unix ./tests/KdybyTests/
- vendor/bin/tester $COVERAGE -s -p php -c ./tests/php.ini-unix ./tests/KdybyTests/
- php /tmp/php-parallel-lint/parallel-lint.php -e php,phpt --exclude vendor .
- php /tmp/code-checker/src/code-checker.php --short-arrays

after_script:
# Report Code Coverage
- >
if [ "$COVERAGE" != "" ]; then
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
&& php coveralls.phar --verbose --config tests/.coveralls.yml
|| true; fi
after_failure:
- 'for i in $(find ./tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done'
4 changes: 4 additions & 0 deletions tests/.coveralls.yml
@@ -0,0 +1,4 @@
# for php-coveralls
service_name: travis-ci
coverage_clover: coverage.xml
json_path: coverage.json

0 comments on commit 9e8e295

Please sign in to comment.