From 4f86ebdb9a1d60fd0fff58ff7622fec27dccabf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Proch=C3=A1zka?= Date: Thu, 25 Aug 2016 23:19:12 +0200 Subject: [PATCH] tests coverage: coveralls --- .travis.yml | 10 +++++++++- tests/.coveralls.yml | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 tests/.coveralls.yml diff --git a/.travis.yml b/.travis.yml index a1fd48a..7b13873 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,8 @@ matrix: include: - php: 5.6 env: NETTE=nette-2.3 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable" + - php: 7.0 + env: NETTE=nette-2.4 COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg" exclude: - php: 5.4 env: NETTE=nette-2.4-dev @@ -34,6 +36,8 @@ matrix: env: NETTE=nette-2.4 allow_failures: - php: hhvm + - php: 7.0 + env: NETTE=nette-2.4 COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg" before_install: - travis_retry composer self-update @@ -44,11 +48,15 @@ install: - travis_retry composer update --no-interaction --prefer-dist $COMPOSER_EXTRA_ARGS - 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 + - travis_retry wget -O /tmp/coveralls.phar https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar script: - - vendor/bin/tester -s -p php -c ./tests/php.ini-unix ./tests/KdybyTests/ + - vendor/bin/tester $COVERAGE -s -p ${TESTER_RUNTIME:-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: + - if [ "$COVERAGE" != "" ]; then php /tmp/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 0000000..82764a3 --- /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