diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml
index a5891abb..82227821 100644
--- a/.github/workflows/pr-builder.yml
+++ b/.github/workflows/pr-builder.yml
@@ -44,3 +44,11 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
+ - name: Generate coverage report
+ run: mvn test jacoco:report
+
+ - name: Upload coverage reports to Codecov
+ uses: codecov/codecov-action@v4
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ files : target/site/jacoco/jacoco.xml
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 00000000..9571a5f2
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,16 @@
+
+codecov:
+ require_ci_to_pass: yes
+ notify:
+ wait_for_ci: yes
+coverage:
+ status:
+ project:
+ default:
+ enabled: yes
+ threshold: null
+ target: auto
+ patch:
+ default:
+ target: 80%
+ threshold: 40%
diff --git a/modules/charon-core/pom.xml b/modules/charon-core/pom.xml
index 8327af97..56a703a2 100644
--- a/modules/charon-core/pom.xml
+++ b/modules/charon-core/pom.xml
@@ -64,6 +64,11 @@
mockito-inline
test
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -180,6 +185,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/modules/charon-impl/pom.xml b/modules/charon-impl/pom.xml
index a47e71b1..40169d57 100644
--- a/modules/charon-impl/pom.xml
+++ b/modules/charon-impl/pom.xml
@@ -46,6 +46,11 @@
org.wso2.charon
org.wso2.charon3.utils
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -80,6 +85,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/modules/charon-samples/pom.xml b/modules/charon-samples/pom.xml
index c70c934c..3710583a 100644
--- a/modules/charon-samples/pom.xml
+++ b/modules/charon-samples/pom.xml
@@ -65,6 +65,11 @@
org.apache.logging.log4j
log4j-1.2-api
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -92,6 +97,25 @@
maven-compiler-plugin
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/modules/charon-utils/pom.xml b/modules/charon-utils/pom.xml
index f03f7d7b..7366c515 100644
--- a/modules/charon-utils/pom.xml
+++ b/modules/charon-utils/pom.xml
@@ -47,6 +47,11 @@
org.ops4j.pax.logging
pax-logging-api
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -55,6 +60,25 @@
org.apache.maven.plugins
maven-compiler-plugin
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/pom.xml b/pom.xml
index e633f07d..dca6c406 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,6 +137,16 @@
jacoco-maven-plugin
${jacoco.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -266,6 +276,44 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -281,7 +329,26 @@
org.codehaus.mojo
buildnumber-maven-plugin
-
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
+
@@ -305,7 +372,26 @@
-
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
+
@@ -352,6 +438,8 @@
${artifactId}
wso2
https://sonarcloud.io
+
+ 0.8.12