From f2b4ac82ddc59575e750e5a73b0caa57232732f9 Mon Sep 17 00:00:00 2001 From: asekawa <40081059+asekawa@users.noreply.github.com> Date: Sat, 17 Aug 2024 10:29:04 +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 04d878c9962bc5f095b0b499a404a65914894bec Mon Sep 17 00:00:00 2001 From: asekawa <40081059+asekawa@users.noreply.github.com> Date: Sat, 17 Aug 2024 10:29:06 +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 919ec49..c561ae2 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 03b95eeba0af0e1ed11a5167c1b3e6343ad14915 Mon Sep 17 00:00:00 2001 From: asekawa <40081059+asekawa@users.noreply.github.com> Date: Sat, 17 Aug 2024 10:29:11 +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 2a89caf..54ef146 100644 --- a/pom.xml +++ b/pom.xml @@ -145,6 +145,11 @@ pax-logging-api ${pax.logging.api.version} + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -182,6 +187,25 @@ false + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + @@ -290,6 +314,8 @@ 1.10.1 + + 0.8.12 From 3e8c07f3afec9464cb83fc1cf5032c3468ec2fcc Mon Sep 17 00:00:00 2001 From: asekawa Date: Sat, 17 Aug 2024 10:29:55 +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 | 24 ++++++++++ .../pom.xml | 24 ++++++++++ .../pom.xml | 24 ++++++++++ pom.xml | 45 ++++++++++++++++++- 7 files changed, 188 insertions(+), 1 deletion(-) diff --git a/components/org.wso2.carbon.identity.tools.saml.validator.stub/pom.xml b/components/org.wso2.carbon.identity.tools.saml.validator.stub/pom.xml index e3b8bef..795b3a1 100644 --- a/components/org.wso2.carbon.identity.tools.saml.validator.stub/pom.xml +++ b/components/org.wso2.carbon.identity.tools.saml.validator.stub/pom.xml @@ -98,6 +98,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + @@ -110,6 +129,11 @@ org.apache.axis2.wso2 axis2-client + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + diff --git a/components/org.wso2.carbon.identity.tools.saml.validator.ui/pom.xml b/components/org.wso2.carbon.identity.tools.saml.validator.ui/pom.xml index 4505ce3..93088d3 100644 --- a/components/org.wso2.carbon.identity.tools.saml.validator.ui/pom.xml +++ b/components/org.wso2.carbon.identity.tools.saml.validator.ui/pom.xml @@ -77,6 +77,11 @@ org.wso2.orbit.org.owasp.encoder encoder + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -106,6 +111,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/components/org.wso2.carbon.identity.tools.saml.validator/pom.xml b/components/org.wso2.carbon.identity.tools.saml.validator/pom.xml index 61df62d..2d8dbfd 100644 --- a/components/org.wso2.carbon.identity.tools.saml.validator/pom.xml +++ b/components/org.wso2.carbon.identity.tools.saml.validator/pom.xml @@ -79,6 +79,11 @@ org.wso2.carbon.identity.carbon.auth.saml2 org.wso2.carbon.identity.authenticator.saml2.sso.common + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -124,6 +129,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/features/org.wso2.carbon.identity.tools.saml.validator.feature/pom.xml b/features/org.wso2.carbon.identity.tools.saml.validator.feature/pom.xml index 032e2ff..9eadda7 100644 --- a/features/org.wso2.carbon.identity.tools.saml.validator.feature/pom.xml +++ b/features/org.wso2.carbon.identity.tools.saml.validator.feature/pom.xml @@ -46,6 +46,11 @@ ${project.version} zip + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -76,6 +81,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/features/org.wso2.carbon.identity.tools.saml.validator.server.feature/pom.xml b/features/org.wso2.carbon.identity.tools.saml.validator.server.feature/pom.xml index 173305a..be3bf5e 100644 --- a/features/org.wso2.carbon.identity.tools.saml.validator.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.tools.saml.validator.server.feature/pom.xml @@ -37,6 +37,11 @@ org.wso2.carbon.identity.tool.validator.sso.saml2 org.wso2.carbon.identity.tools.saml.validator + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -73,6 +78,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/features/org.wso2.carbon.identity.tools.saml.validator.ui.feature/pom.xml b/features/org.wso2.carbon.identity.tools.saml.validator.ui.feature/pom.xml index e0a0a2b..2de4f4e 100644 --- a/features/org.wso2.carbon.identity.tools.saml.validator.ui.feature/pom.xml +++ b/features/org.wso2.carbon.identity.tools.saml.validator.ui.feature/pom.xml @@ -46,6 +46,11 @@ org.wso2.carbon org.wso2.carbon.ui.menu.tools + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -84,6 +89,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/pom.xml b/pom.xml index 54ef146..6e95e5c 100644 --- a/pom.xml +++ b/pom.xml @@ -150,6 +150,11 @@ jacoco-maven-plugin ${jacoco.version} + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -206,6 +211,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + @@ -254,7 +278,26 @@ - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + +