diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml
index 919ec49..06f6910 100644
--- a/.github/workflows/pr-builder.yml
+++ b/.github/workflows/pr-builder.yml
@@ -39,3 +39,12 @@ 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 0000000..9571a5f
--- /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/io.asgardeo.tomcat.saml.agent.sample/pom.xml b/io.asgardeo.tomcat.saml.agent.sample/pom.xml
index 35a5c9e..763305d 100644
--- a/io.asgardeo.tomcat.saml.agent.sample/pom.xml
+++ b/io.asgardeo.tomcat.saml.agent.sample/pom.xml
@@ -67,6 +67,25 @@
maven-clean-plugin
2.1
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -76,5 +95,10 @@
io.asgardeo.tomcat.saml.agent
${project.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
diff --git a/io.asgardeo.tomcat.saml.agent/pom.xml b/io.asgardeo.tomcat.saml.agent/pom.xml
index 56e9137..f33303a 100644
--- a/io.asgardeo.tomcat.saml.agent/pom.xml
+++ b/io.asgardeo.tomcat.saml.agent/pom.xml
@@ -36,6 +36,11 @@
io.asgardeo.java.saml.sdk
io.asgardeo.java.saml.sdk
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -48,6 +53,25 @@
1.8
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 343dc34..b568ba4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,6 +51,11 @@
io.asgardeo.java.saml.sdk
${io.asgardeo.java.saml.sdk.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -74,6 +79,25 @@
false
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -128,7 +152,9 @@
1.4
0.1.15
-
+
+ 0.8.6
+
io.asgardeo.tomcat.saml.agent