From 26ae8704d60514bbc0164ef487b2123acc8fe2b9 Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Wed, 7 Dec 2016 12:36:35 -0700 Subject: [PATCH 1/6] Add default Codecov configuration Will change shortly. --- .codecov.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..2b5037ed5 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,26 @@ +codecov: + notify: + require_ci_to_pass: yes + +coverage: + precision: 2 + round: down + range: "70...100" + + status: + project: yes + patch: yes + changes: no + +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no + +comment: + layout: "header, diff" + behavior: default + require_changes: no From 5bd07b253a417e3d9ac3ffd0826924ed6013cb34 Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Fri, 9 Dec 2016 12:00:07 -0700 Subject: [PATCH 2/6] Be explicit about coverage project requirements If a change drops coverage (absolutely) beneath 80% or (relatively) reduces coverage by more than 0.5%, give it a bad status. --- .codecov.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 2b5037ed5..3d6493c62 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -8,7 +8,10 @@ coverage: range: "70...100" status: - project: yes + project: + default: + target: 80 + threshold: 0.5 patch: yes changes: no From 14f4dfb242ba2e1b90c200e9f62155b3b389604e Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Fri, 9 Dec 2016 12:10:14 -0700 Subject: [PATCH 3/6] Make patch target 75% If a patch has very bad coverage, reject it. --- .codecov.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 3d6493c62..59dd93e44 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -12,7 +12,9 @@ coverage: default: target: 80 threshold: 0.5 - patch: yes + patch: + default: + target: 75 changes: no parsers: From 145537a5d2a3fff131b4947c4c9f3a9af1006a50 Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Fri, 9 Dec 2016 12:20:50 -0700 Subject: [PATCH 4/6] Add ignore rules --- .codecov.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 59dd93e44..59079f338 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -16,7 +16,12 @@ coverage: default: target: 75 changes: no - + ignore: + - "src/backend/distributed/utils/citus_outfuncs.c" + - "src/backend/distributed/utils/citus_read.c" + - "src/backend/distributed/utils/citus_readfuncs_95.c" + - "src/backend/distributed/utils/ruleutils_*.c" + - "src/include/distributed/citus_nodes.h" parsers: gcov: branch_detection: From 1e4f5e1a95bfc55d090b78d60a96eb16b9ac3417 Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Fri, 9 Dec 2016 12:35:48 -0700 Subject: [PATCH 5/6] Format for readability --- .codecov.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 59079f338..213d596b7 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -7,21 +7,25 @@ coverage: round: down range: "70...100" - status: - project: - default: - target: 80 - threshold: 0.5 - patch: - default: - target: 75 - changes: no ignore: - "src/backend/distributed/utils/citus_outfuncs.c" - "src/backend/distributed/utils/citus_read.c" - "src/backend/distributed/utils/citus_readfuncs_95.c" - "src/backend/distributed/utils/ruleutils_*.c" - "src/include/distributed/citus_nodes.h" + + status: + project: + default: + target: 80 + threshold: 0.5 + + patch: + default: + target: 75 + + changes: no + parsers: gcov: branch_detection: From 2ca9c78540519a63dd4dcb76e550db887cd3e6df Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Fri, 9 Dec 2016 14:06:35 -0700 Subject: [PATCH 6/6] Bump target to 87.5% With the ignore rules in place, we can increase the target. --- .codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 213d596b7..2d292bc08 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -17,7 +17,7 @@ coverage: status: project: default: - target: 80 + target: 87.5 threshold: 0.5 patch: