diff --git a/.github/workflows/pull_request_ubuntu_build.yml b/.github/workflows/pull_request_ubuntu_build.yml
index 1b101bee8..b206c62fd 100644
--- a/.github/workflows/pull_request_ubuntu_build.yml
+++ b/.github/workflows/pull_request_ubuntu_build.yml
@@ -19,3 +19,8 @@ jobs:
cache: maven
- name: Build with Maven
run: mvn clean install
+ - name: Upload test coverage to Codecov
+ uses: codecov/codecov-action@v4.0.1
+ with:
+ flags: unit_tests
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/monitoring-dashboard/integration/org.wso2.micro.integrator.dashboard.integration.tests/pom.xml b/monitoring-dashboard/integration/org.wso2.micro.integrator.dashboard.integration.tests/pom.xml
index 0c2a8b95c..2368c0004 100644
--- a/monitoring-dashboard/integration/org.wso2.micro.integrator.dashboard.integration.tests/pom.xml
+++ b/monitoring-dashboard/integration/org.wso2.micro.integrator.dashboard.integration.tests/pom.xml
@@ -48,13 +48,16 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.4
+
maven-surefire-plugin
- 2.12.4
- false
+ 2.22.2
-
- -Xms512m -Xmx1024m
+ ${argLine}
false
false
diff --git a/pom.xml b/pom.xml
index ad72db824..4c0a91933 100644
--- a/pom.xml
+++ b/pom.xml
@@ -232,6 +232,62 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.4
+
+
+ default-prepare-agent-by-coverage-enforcer
+
+ prepare-agent
+
+
+ argLine
+
+
+
+ default-report-by-coverage-enforcer
+
+ report
+
+
+ ${project.build.directory}/jacoco.exec
+
+
+
+ default-check-by-coverage-enforcer
+
+ check
+
+
+ ${project.build.directory}/jacoco.exec
+
+
+
+ BUNDLE
+
+
+
+ LINE
+ COVEREDRATIO
+ 0.0
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.22.2
+
+ @{argline} -Xms512m -Xmx1024m
+
+
org.apache.maven.plugins
maven-release-plugin