From e1e867befdee5dfbbac042e0c311c1c9c5133bd5 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 12 Dec 2016 22:47:45 +0100 Subject: [PATCH] Feature/integrate codacy (#9) * REFACTOR: Move scripts to Makefile * FEATURE: Add codacy --- .travis.yml | 4 +--- Makefile | 13 +++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) 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