diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml
index f8b6f55..b9b2335 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.java.oidc.sdk/pom.xml b/io.asgardeo.java.oidc.sdk/pom.xml
index 7eebd07..0ee0368 100644
--- a/io.asgardeo.java.oidc.sdk/pom.xml
+++ b/io.asgardeo.java.oidc.sdk/pom.xml
@@ -106,6 +106,11 @@
jetty-util
test
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -120,6 +125,25 @@
1.8
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/pom.xml b/pom.xml
index f990bf8..47e7b59 100644
--- a/pom.xml
+++ b/pom.xml
@@ -136,6 +136,11 @@
${eclipse.jetty.version}
test
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -159,6 +164,25 @@
false
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -224,7 +248,9 @@
2.0.7
3.8.0
11.0.22
-
+
+ 0.8.6
+
io.asgardeo.java.oidc.sdk