diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml
index 3ca871dc..634b7c17 100644
--- a/.github/workflows/pr-builder.yml
+++ b/.github/workflows/pr-builder.yml
@@ -39,3 +39,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 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/components/org.wso2.carbon.identity.application.authenticator.magiclink/pom.xml b/components/org.wso2.carbon.identity.application.authenticator.magiclink/pom.xml
index 21db40d2..7975f361 100644
--- a/components/org.wso2.carbon.identity.application.authenticator.magiclink/pom.xml
+++ b/components/org.wso2.carbon.identity.application.authenticator.magiclink/pom.xml
@@ -103,6 +103,11 @@
org.jacoco.agent
runtime
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -213,6 +218,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/features/org.wso2.carbon.identity.local.auth.magiclink.server.feature/pom.xml b/features/org.wso2.carbon.identity.local.auth.magiclink.server.feature/pom.xml
index 4a6e194f..0b81f32e 100644
--- a/features/org.wso2.carbon.identity.local.auth.magiclink.server.feature/pom.xml
+++ b/features/org.wso2.carbon.identity.local.auth.magiclink.server.feature/pom.xml
@@ -35,6 +35,11 @@
org.wso2.carbon.identity.local.auth.magiclink
org.wso2.carbon.identity.application.authenticator.magiclink
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -64,6 +69,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/pom.xml b/pom.xml
index fd0ea972..e4efcc2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -133,6 +133,16 @@
runtime
${jacoco.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -182,6 +192,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
+
+
+
+
@@ -210,7 +258,26 @@
org.codehaus.mojo
buildnumber-maven-plugin
-
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
+
@@ -252,6 +319,8 @@
3.0.5
3.2.0
1.4
+
+ 0.8.12