From cd508ad057fbe67e7f70577c4c8c0081b46470f1 Mon Sep 17 00:00:00 2001 From: Keran Yang Date: Sun, 12 Feb 2023 22:32:32 -0500 Subject: [PATCH] chore: introduce coverage report/check (#18) This change uses jacoco to add coverage report/check. Our current line coverage sits at ~70%. I set the minimum line coverage to 70% to ensure future changes align with such requirement. When we have CI enabled, new code that doesn't meet 70% coverage will fail build. Signed-off-by: Keran Yang Co-authored-by: Vigith Maurice --- lombok.config | 7 +++++++ pom.xml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 lombok.config diff --git a/lombok.config b/lombok.config new file mode 100644 index 00000000..e5340441 --- /dev/null +++ b/lombok.config @@ -0,0 +1,7 @@ +# This tells lombok this directory is the root, +# no need to look somewhere else for java code. +config.stopBubbling = true +# This will add the @lombok.Generated annotation +# to all the code generated by Lombok, +# so it can be excluded from coverage by jacoco. +lombok.addLombokGeneratedAnnotation = true diff --git a/pom.xml b/pom.xml index 68bc024b..6857a8c8 100644 --- a/pom.xml +++ b/pom.xml @@ -118,6 +118,53 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + io/numaproj/numaflow/sink/v1/* + io/numaproj/numaflow/function/v1/* + io/numaproj/numaflow/function/metadata/* + io/numaproj/numaflow/utils/* + + + + + + prepare-agent + + + + report + prepare-package + + report + + + + jacoco-check + + check + + + + + BUNDLE + + + LINE + COVEREDRATIO + 0.70 + + + + + + + +