diff --git a/.travis.yml b/.travis.yml index 84984ad..539e746 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,9 +46,7 @@ install: make install script: make Tests after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover .Build/report/unit/clover/coverage - - php ocular.phar code-coverage:upload --format=php-clover .Build/report/functional/clover/coverage + - make uploadCodeCoverage - make clean cache: diff --git a/Makefile b/Makefile index 7fe83d5..be9f02c 100644 --- a/Makefile +++ b/Makefile @@ -31,5 +31,18 @@ functionalTests: .PHONY: Tests Tests: unitTests functionalTests +uploadCodeCoverage: uploadCodeCoverageToScrutinizer uploadCodeCoverageToCodacy + +uploadCodeCoverageToScrutinizer: + wget https://scrutinizer-ci.com/ocular.phar && \ + php ocular.phar code-coverage:upload --format=php-clover .Build/report/unit/clover/coverage && \ + php ocular.phar code-coverage:upload --format=php-clover .Build/report/functional/clover/coverage + +uploadCodeCoverageToCodacy: + composer require -vv --dev codacy/coverage && \ + git checkout composer.json && \ + php .Build/bin/codacycoverage clover .Build/report/unit/clover/coverage && \ + php .Build/bin/codacycoverage clover .Build/report/functional/clover/coverage + clean: rm -rf .Build composer.lock