From 3068fcfb1233c5f3ebcd0ec6e17cf319730d38c4 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Sun, 3 Dec 2017 17:17:00 +0900 Subject: [PATCH] Enable Scrutinizer build failure if coverage decrease --- .scrutinizer.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 43a6c266..f6956e16 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,5 +1,6 @@ checks: php: true + coding_style: php: spaces: @@ -8,6 +9,20 @@ coding_style: around_operators: concatenation: true +build: + nodes: + analysis: + tests: + override: + - phpcs-run + - php-scrutinizer-run + tools: external_code_coverage: timeout: 3600 + +build_failure_conditions: + - 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed + - 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity + - 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection + - 'patches.label("Unused Use Statements").new.exists' # No new unused imports patches allowed