mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-25 15:56:11 +01:00
Feature/integrate codacy (#9)
* REFACTOR: Move scripts to Makefile * FEATURE: Add codacy
This commit is contained in:
parent
dc8e04b449
commit
e1e867befd
2 changed files with 14 additions and 3 deletions
|
@ -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:
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue