From 02b6b862da5d1f970f4865503aa6660073d81809 Mon Sep 17 00:00:00 2001 From: asekawa <40081059+asekawa@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:10:22 +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 7c8b0f17737709f7fa1775e85c8690f9eaa60f1a Mon Sep 17 00:00:00 2001 From: asekawa <40081059+asekawa@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:10:23 +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 1af73751f6973e8f140c021b8d8be5ce7857c43d Mon Sep 17 00:00:00 2001 From: asekawa <40081059+asekawa@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:10:29 +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 fd0ea97..539666b 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,11 @@ runtime ${jacoco.version} + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -182,6 +187,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + @@ -252,6 +276,8 @@ 3.0.5 3.2.0 1.4 + + 0.8.12 From f46f1bc706ab82c1d47586cdad6851783e678eef Mon Sep 17 00:00:00 2001 From: asekawa Date: Tue, 26 Nov 2024 10:10:53 +0530 Subject: [PATCH 4/4] Update all component pom.xml files with JaCoCo configuration --- .../pom.xml | 24 ++++++++++ .../pom.xml | 24 ++++++++++ pom.xml | 45 ++++++++++++++++++- 3 files changed, 92 insertions(+), 1 deletion(-) diff --git a/components/org.wso2.carbon.identity.application.authenticator.magiclink/pom.xml b/components/org.wso2.carbon.identity.application.authenticator.magiclink/pom.xml index 21db40d..7975f36 100644 --- a/components/org.wso2.carbon.identity.application.authenticator.magiclink/pom.xml +++ b/components/org.wso2.carbon.identity.application.authenticator.magiclink/pom.xml @@ -103,6 +103,11 @@ org.jacoco.agent runtime + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -213,6 +218,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/features/org.wso2.carbon.identity.local.auth.magiclink.server.feature/pom.xml b/features/org.wso2.carbon.identity.local.auth.magiclink.server.feature/pom.xml index 4a6e194..0b81f32 100644 --- a/features/org.wso2.carbon.identity.local.auth.magiclink.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.local.auth.magiclink.server.feature/pom.xml @@ -35,6 +35,11 @@ org.wso2.carbon.identity.local.auth.magiclink org.wso2.carbon.identity.application.authenticator.magiclink + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -64,6 +69,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + diff --git a/pom.xml b/pom.xml index 539666b..e4efcc2 100644 --- a/pom.xml +++ b/pom.xml @@ -138,6 +138,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 + + + + @@ -234,7 +258,26 @@ org.codehaus.mojo buildnumber-maven-plugin - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + +