From 9e8e295dfd0e72f832de3ea8cbfa364e3bf74bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Proch=C3=A1zka?= Date: Thu, 25 Aug 2016 20:20:02 +0200 Subject: [PATCH] tests coverage: coveralls --- .travis.yml | 13 ++++++++++++- tests/.coveralls.yml | 4 ++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tests/.coveralls.yml diff --git a/.travis.yml b/.travis.yml index a1fd48aa..78424272 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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' diff --git a/tests/.coveralls.yml b/tests/.coveralls.yml new file mode 100644 index 00000000..82764a3f --- /dev/null +++ b/tests/.coveralls.yml @@ -0,0 +1,4 @@ +# for php-coveralls +service_name: travis-ci +coverage_clover: coverage.xml +json_path: coverage.json