From 8374941d713ac6eafade484d573e0b4030108fc9 Mon Sep 17 00:00:00 2001 From: Herberto Graca Date: Fri, 16 Mar 2018 00:07:15 +0100 Subject: [PATCH] Integrate with codecov --- .codecov.yml | 23 +++++++++++++++++++++++ .scrutinizer.yml | 1 + Makefile | 3 +++ README.md | 4 ++-- 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..3edc2138 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,23 @@ +coverage: + precision: 1 # how many decimal places to display in the UI: 0 <= value <= 4 + round: nearest # how coverage is rounded: down/up/nearest + range: 50...100 # custom range of coverage colors from red -> yellow -> green + status: + + project: # measuring the overall project coverage + default: # context, you can create multiple ones with custom titles + enabled: yes # must be yes|true to enable this status + target: auto # specify the target coverage for each commit status + # option: "auto" (must increase from parent commit or pull request base) + # option: "X%" a static target percentage to hit + + patch: # pull requests only: this commit status will measure the + # entire pull requests Coverage Diff. Checking if the lines + # adjusted are covered at least X%. + default: + enabled: yes # must be yes|true to enable this status + target: 85% # specify the target "X%" coverage to hit + + + + diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 732afa99..a436cfde 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -26,6 +26,7 @@ build: coverage: file: var/coverage.clover.xml format: php-clover + - command: make test_cov-publish filter: paths: diff --git a/Makefile b/Makefile index ba2fc401..5a96bf89 100755 --- a/Makefile +++ b/Makefile @@ -141,6 +141,9 @@ test_cov: test_cov-guest: phpdbg -qrr vendor/bin/phpunit --coverage-text --coverage-clover=${COVERAGE_REPORT_PATH} +test_cov-publish: + bash -c 'bash <(curl -s https://codecov.io/bash)' + up: if [ ! -f ${DB_PATH} ]; then $(MAKE) db-setup; fi $(eval UP=ENV=dev docker-compose -f build/container/dev/docker-compose.yml up -t 0) diff --git a/README.md b/README.md index 0e3ee5a0..85afa40a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Symfony Demo Application [![Build Status][Build]](https://scrutinizer-ci.com/g/hgraca/explicit-architecture-php/build-status/master) [![Scrutinizer Code Quality][Score]](https://scrutinizer-ci.com/g/hgraca/explicit-architecture-php/?branch=master) -[![Coverage Status][Coverage]](https://scrutinizer-ci.com/g/hgraca/explicit-architecture-php/code-structure) +[![CodeCov][CodeCov]](https://codecov.io/gh/hgraca/explicit-architecture-php) [![Code Intelligence Status][CodeInt]](https://scrutinizer-ci.com/code-intelligence) @@ -91,5 +91,5 @@ Configure the test run itself: [Build]: https://scrutinizer-ci.com/g/hgraca/explicit-architecture-php/badges/build.png?b=master [Score]: https://scrutinizer-ci.com/g/hgraca/explicit-architecture-php/badges/quality-score.png?b=master -[Coverage]: https://img.shields.io/scrutinizer/coverage/g/hgraca/explicit-architecture-php.svg?style=flat-square +[CodeCov]: https://codecov.io/gh/hgraca/explicit-architecture-php/branch/master/graph/badge.svg [CodeInt]: https://scrutinizer-ci.com/g/hgraca/explicit-architecture-php/badges/code-intelligence.svg?b=master