From 37a0c8f5ce87a34899718eeac4150c93d10d7fdf Mon Sep 17 00:00:00 2001
From: asekawa <40081059+asekawa@users.noreply.github.com>
Date: Mon, 19 Aug 2024 07:54: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 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%
From 25c90343e813d1f01e11d711adfe8a7dae757edc Mon Sep 17 00:00:00 2001
From: asekawa <40081059+asekawa@users.noreply.github.com>
Date: Mon, 19 Aug 2024 07:54:55 +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 3ca871d..634b7c1 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
From 012e8207422dae9bff817efe48296c27e3f34c9b Mon Sep 17 00:00:00 2001
From: asekawa <40081059+asekawa@users.noreply.github.com>
Date: Mon, 19 Aug 2024 07:54:59 +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 3c198af..f5597b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -172,6 +172,11 @@
org.wso2.carbon.identity.multi.attribute.login.mgt
${carbon.identity.framework.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -209,6 +214,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -296,5 +320,7 @@
1.10.1
UTF-8
+
+ 0.8.12
From e253dc405420a09d7098423ed8ec83d5110a8cae Mon Sep 17 00:00:00 2001
From: asekawa
Date: Mon, 19 Aug 2024 07:55:40 +0530
Subject: [PATCH 4/4] Update all component pom.xml files with JaCoCo
configuration
---
.../pom.xml | 24 ++++++++++
.../pom.xml | 24 ++++++++++
.../pom.xml | 24 ++++++++++
pom.xml | 45 ++++++++++++++++++-
4 files changed, 116 insertions(+), 1 deletion(-)
diff --git a/components/org.wso2.carbon.api.server.local.auth.api/pom.xml b/components/org.wso2.carbon.api.server.local.auth.api/pom.xml
index bbfd925..b24fcc4 100644
--- a/components/org.wso2.carbon.api.server.local.auth.api/pom.xml
+++ b/components/org.wso2.carbon.api.server.local.auth.api/pom.xml
@@ -70,6 +70,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -174,5 +193,10 @@
cors-filter
provided
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
diff --git a/components/org.wso2.carbon.identity.local.auth.api.core/pom.xml b/components/org.wso2.carbon.identity.local.auth.api.core/pom.xml
index 79f298b..0e2baa5 100644
--- a/components/org.wso2.carbon.identity.local.auth.api.core/pom.xml
+++ b/components/org.wso2.carbon.identity.local.auth.api.core/pom.xml
@@ -77,6 +77,11 @@
org.wso2.carbon.identity.framework
org.wso2.carbon.identity.multi.attribute.login.mgt
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -131,6 +136,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
\ No newline at end of file
diff --git a/components/org.wso2.carbon.identity.local.auth.api.endpoint/pom.xml b/components/org.wso2.carbon.identity.local.auth.api.endpoint/pom.xml
index c43cf19..7bf58e4 100644
--- a/components/org.wso2.carbon.identity.local.auth.api.endpoint/pom.xml
+++ b/components/org.wso2.carbon.identity.local.auth.api.endpoint/pom.xml
@@ -55,6 +55,25 @@
api#identity#auth#v1.1
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -142,5 +161,10 @@
cors-filter
provided
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
diff --git a/pom.xml b/pom.xml
index f5597b5..5fb4a7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -177,6 +177,11 @@
jacoco-maven-plugin
${jacoco.version}
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
@@ -233,6 +238,25 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
@@ -274,7 +298,26 @@
-
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+
+ prepare-agent
+
+
+
+ report
+ test
+
+ report
+
+
+
+
+