Feature/integrate codacy (#9)

* REFACTOR: Move scripts to Makefile

* FEATURE: Add codacy
This commit is contained in:
Daniel Siepmann 2016-12-12 22:47:45 +01:00 committed by GitHub
parent dc8e04b449
commit e1e867befd
2 changed files with 14 additions and 3 deletions

View file

@ -46,9 +46,7 @@ install: make install
script: make Tests script: make Tests
after_script: after_script:
- wget https://scrutinizer-ci.com/ocular.phar - make uploadCodeCoverage
- 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 clean - make clean
cache: cache:

View file

@ -31,5 +31,18 @@ functionalTests:
.PHONY: Tests .PHONY: Tests
Tests: unitTests functionalTests 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: clean:
rm -rf .Build composer.lock rm -rf .Build composer.lock