From cb6e58e3ad197c30d9c7568513ffdbe34271f56b Mon Sep 17 00:00:00 2001
From: asekawa <40081059+asekawa@users.noreply.github.com>
Date: Sun, 18 Aug 2024 16:53:53 +0530
Subject: [PATCH 1/4] [Automated]Add Codecov configuration
---
codecov.yml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 codecov.yml
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%
From 63f62aafda85c02a2a606b6b7462fad7359f409d Mon Sep 17 00:00:00 2001
From: asekawa <40081059+asekawa@users.noreply.github.com>
Date: Sun, 18 Aug 2024 16:53:54 +0530
Subject: [PATCH 2/4] Update PR builder with Codecov steps
---
.github/workflows/pr-builder.yml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml
index a5891abb..82227821 100644
--- a/.github/workflows/pr-builder.yml
+++ b/.github/workflows/pr-builder.yml
@@ -44,3 +44,11 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
+ - 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
From f4c4dabd50912178f66ce07b857a1de9a08fa47f Mon Sep 17 00:00:00 2001
From: asekawa <40081059+asekawa@users.noreply.github.com>
Date: Sun, 18 Aug 2024 16:53:58 +0530
Subject: [PATCH 3/4] Update root pom.xml with JaCoCo configuration
---
pom.xml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/pom.xml b/pom.xml
index e633f07d..b89c2660 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,6 +137,11 @@
jacoco-maven-plugin
${jacoco.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -266,6 +271,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -352,6 +376,8 @@
${artifactId}
wso2
https://sonarcloud.io
+
+ 0.8.12
From 067eff982e0deee87f26194d368295182450d1c9 Mon Sep 17 00:00:00 2001
From: asekawa
Date: Sun, 18 Aug 2024 16:55:05 +0530
Subject: [PATCH 4/4] Update all component pom.xml files with JaCoCo
configuration
---
modules/charon-core/pom.xml | 24 +++++++++++++
modules/charon-impl/pom.xml | 24 +++++++++++++
modules/charon-samples/pom.xml | 24 +++++++++++++
modules/charon-utils/pom.xml | 24 +++++++++++++
pom.xml | 66 ++++++++++++++++++++++++++++++++--
5 files changed, 160 insertions(+), 2 deletions(-)
diff --git a/modules/charon-core/pom.xml b/modules/charon-core/pom.xml
index 8327af97..56a703a2 100644
--- a/modules/charon-core/pom.xml
+++ b/modules/charon-core/pom.xml
@@ -64,6 +64,11 @@
mockito-inline
test
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -180,6 +185,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/modules/charon-impl/pom.xml b/modules/charon-impl/pom.xml
index a47e71b1..40169d57 100644
--- a/modules/charon-impl/pom.xml
+++ b/modules/charon-impl/pom.xml
@@ -46,6 +46,11 @@
org.wso2.charon
org.wso2.charon3.utils
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -80,6 +85,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/modules/charon-samples/pom.xml b/modules/charon-samples/pom.xml
index c70c934c..3710583a 100644
--- a/modules/charon-samples/pom.xml
+++ b/modules/charon-samples/pom.xml
@@ -65,6 +65,11 @@
org.apache.logging.log4j
log4j-1.2-api
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -92,6 +97,25 @@
maven-compiler-plugin
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/modules/charon-utils/pom.xml b/modules/charon-utils/pom.xml
index f03f7d7b..7366c515 100644
--- a/modules/charon-utils/pom.xml
+++ b/modules/charon-utils/pom.xml
@@ -47,6 +47,11 @@
org.ops4j.pax.logging
pax-logging-api
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -55,6 +60,25 @@
org.apache.maven.plugins
maven-compiler-plugin
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
diff --git a/pom.xml b/pom.xml
index b89c2660..dca6c406 100644
--- a/pom.xml
+++ b/pom.xml
@@ -142,6 +142,11 @@
jacoco-maven-plugin
${jacoco.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -290,6 +295,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -305,7 +329,26 @@
org.codehaus.mojo
buildnumber-maven-plugin
-
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
+
@@ -329,7 +372,26 @@
-
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
+