diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml
index 51fb47a80..ebab5c898 100644
--- a/.github/workflows/pr-builder.yml
+++ b/.github/workflows/pr-builder.yml
@@ -46,3 +46,11 @@ jobs:
- name: Build with Maven
run: mvn clean install -U -B
+ - 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 000000000..9571a5f2a
--- /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/components/org.wso2.carbon.identity.scim2.common/pom.xml b/components/org.wso2.carbon.identity.scim2.common/pom.xml
index 88ee29e84..3d0e85bcd 100644
--- a/components/org.wso2.carbon.identity.scim2.common/pom.xml
+++ b/components/org.wso2.carbon.identity.scim2.common/pom.xml
@@ -195,6 +195,11 @@
org.ops4j.pax.logging
pax-logging-api
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -306,18 +311,6 @@
-
- default-instrument
-
- instrument
-
-
-
- default-restore-instrumented-classes
-
- restore-instrumented-classes
-
-
default-report
prepare-package
@@ -360,6 +353,25 @@
High
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/components/org.wso2.carbon.identity.scim2.provider/pom.xml b/components/org.wso2.carbon.identity.scim2.provider/pom.xml
index b0e9c4375..5a62618ad 100644
--- a/components/org.wso2.carbon.identity.scim2.provider/pom.xml
+++ b/components/org.wso2.carbon.identity.scim2.provider/pom.xml
@@ -91,6 +91,11 @@
org.wso2.carbon.identity.recovery
provided
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -124,6 +129,25 @@
Medium
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/features/org.wso2.carbon.identity.scim2.common.feature/pom.xml b/features/org.wso2.carbon.identity.scim2.common.feature/pom.xml
index 64d903b6a..e32d3a36d 100644
--- a/features/org.wso2.carbon.identity.scim2.common.feature/pom.xml
+++ b/features/org.wso2.carbon.identity.scim2.common.feature/pom.xml
@@ -41,6 +41,11 @@
org.wso2.charon
org.wso2.charon3.core
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -130,6 +135,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/features/org.wso2.carbon.identity.scim2.provider.feature/pom.xml b/features/org.wso2.carbon.identity.scim2.provider.feature/pom.xml
index 1c9a26822..8230140ad 100644
--- a/features/org.wso2.carbon.identity.scim2.provider.feature/pom.xml
+++ b/features/org.wso2.carbon.identity.scim2.provider.feature/pom.xml
@@ -38,6 +38,11 @@
org.wso2.carbon.identity.scim2.provider
war
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -146,6 +151,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/features/org.wso2.carbon.identity.scim2.server.feature/pom.xml b/features/org.wso2.carbon.identity.scim2.server.feature/pom.xml
index 7f08e0940..d6ca62b57 100644
--- a/features/org.wso2.carbon.identity.scim2.server.feature/pom.xml
+++ b/features/org.wso2.carbon.identity.scim2.server.feature/pom.xml
@@ -43,6 +43,11 @@
org.wso2.carbon.identity.scim2.provider.feature
zip
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -78,6 +83,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/pom.xml b/pom.xml
index ef38439d0..61c500c15 100644
--- a/pom.xml
+++ b/pom.xml
@@ -265,6 +265,16 @@
pax-logging-api
${pax.logging.api.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -340,6 +350,8 @@
4.5.3.0
1.4.5
+
+ 0.8.12
@@ -388,7 +400,7 @@
com.h3xstream.findsecbugs
findsecbugs-plugin
${findsecbugs-plugin.version}
-
+
@@ -401,6 +413,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
+
+
+
+