diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml index 335ca5d5..11fc6bd5 100644 --- a/.github/workflows/pr-builder.yml +++ b/.github/workflows/pr-builder.yml @@ -43,3 +43,12 @@ 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 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% diff --git a/components/org.wso2.carbon.identity.auth.service/pom.xml b/components/org.wso2.carbon.identity.auth.service/pom.xml index 0c2e69a5..99d706e6 100644 --- a/components/org.wso2.carbon.identity.auth.service/pom.xml +++ b/components/org.wso2.carbon.identity.auth.service/pom.xml @@ -111,7 +111,12 @@ test - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -222,6 +227,25 @@ * + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/components/org.wso2.carbon.identity.auth.valve/pom.xml b/components/org.wso2.carbon.identity.auth.valve/pom.xml index d5c1516b..4eb3cee2 100644 --- a/components/org.wso2.carbon.identity.auth.valve/pom.xml +++ b/components/org.wso2.carbon.identity.auth.valve/pom.xml @@ -125,7 +125,12 @@ tomcat test - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -242,6 +247,25 @@ * + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/components/org.wso2.carbon.identity.authz.service/pom.xml b/components/org.wso2.carbon.identity.authz.service/pom.xml index 3aaac600..edecec34 100644 --- a/components/org.wso2.carbon.identity.authz.service/pom.xml +++ b/components/org.wso2.carbon.identity.authz.service/pom.xml @@ -58,7 +58,12 @@ org.wso2.carbon.identity.auth.rest org.wso2.carbon.identity.auth.service - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -99,6 +104,25 @@ * + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/components/org.wso2.carbon.identity.authz.valve/pom.xml b/components/org.wso2.carbon.identity.authz.valve/pom.xml index 14fa65c2..ff0d42db 100644 --- a/components/org.wso2.carbon.identity.authz.valve/pom.xml +++ b/components/org.wso2.carbon.identity.authz.valve/pom.xml @@ -66,7 +66,12 @@ org.wso2.carbon.identity.organization.management.core org.wso2.carbon.identity.organization.management.service - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -104,6 +109,25 @@ * + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/components/org.wso2.carbon.identity.context.rewrite.valve/pom.xml b/components/org.wso2.carbon.identity.context.rewrite.valve/pom.xml index e7bf6ae4..364916ca 100644 --- a/components/org.wso2.carbon.identity.context.rewrite.valve/pom.xml +++ b/components/org.wso2.carbon.identity.context.rewrite.valve/pom.xml @@ -38,7 +38,12 @@ org.wso2.carbon.identity.organization.management.core org.wso2.carbon.identity.organization.management.service - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -62,6 +67,25 @@ * + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/components/org.wso2.carbon.identity.cors.service/pom.xml b/components/org.wso2.carbon.identity.cors.service/pom.xml index 775705ff..9f4b4eb7 100644 --- a/components/org.wso2.carbon.identity.cors.service/pom.xml +++ b/components/org.wso2.carbon.identity.cors.service/pom.xml @@ -52,7 +52,12 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.cors.mgt.core - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -83,6 +88,25 @@ + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/components/org.wso2.carbon.identity.cors.valve/pom.xml b/components/org.wso2.carbon.identity.cors.valve/pom.xml index b7070a4e..46ab6649 100644 --- a/components/org.wso2.carbon.identity.cors.valve/pom.xml +++ b/components/org.wso2.carbon.identity.cors.valve/pom.xml @@ -71,7 +71,12 @@ org.wso2.carbon.identity.auth.rest org.wso2.carbon.identity.cors.service - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -177,6 +182,25 @@ + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/components/org.wso2.carbon.identity.custom.header.filter/pom.xml b/components/org.wso2.carbon.identity.custom.header.filter/pom.xml index b19cb8d5..7860a61e 100644 --- a/components/org.wso2.carbon.identity.custom.header.filter/pom.xml +++ b/components/org.wso2.carbon.identity.custom.header.filter/pom.xml @@ -33,7 +33,12 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.configuration.mgt.core - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -61,6 +66,25 @@ + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/features/org.wso2.carbon.identity.auth.server.feature/pom.xml b/features/org.wso2.carbon.identity.auth.server.feature/pom.xml index 8630c7f3..febf7115 100644 --- a/features/org.wso2.carbon.identity.auth.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.auth.server.feature/pom.xml @@ -41,7 +41,12 @@ org.wso2.carbon.identity.auth.rest org.wso2.carbon.identity.auth.valve - + + 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/features/org.wso2.carbon.identity.authz.server.feature/pom.xml b/features/org.wso2.carbon.identity.authz.server.feature/pom.xml index 498f7261..7ef7cac8 100644 --- a/features/org.wso2.carbon.identity.authz.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.authz.server.feature/pom.xml @@ -41,7 +41,12 @@ org.wso2.carbon.identity.auth.rest org.wso2.carbon.identity.authz.valve - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -82,6 +87,25 @@ + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/features/org.wso2.carbon.identity.context.rewrite.server.feature/pom.xml b/features/org.wso2.carbon.identity.context.rewrite.server.feature/pom.xml index 7d3b4994..7ef06b0d 100644 --- a/features/org.wso2.carbon.identity.context.rewrite.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.context.rewrite.server.feature/pom.xml @@ -37,7 +37,12 @@ org.wso2.carbon.identity.auth.rest org.wso2.carbon.identity.context.rewrite.valve - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -75,6 +80,25 @@ + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + diff --git a/features/org.wso2.carbon.identity.cors.server.feature/pom.xml b/features/org.wso2.carbon.identity.cors.server.feature/pom.xml index 00552f5f..7fd3616f 100644 --- a/features/org.wso2.carbon.identity.cors.server.feature/pom.xml +++ b/features/org.wso2.carbon.identity.cors.server.feature/pom.xml @@ -39,7 +39,12 @@ org.wso2.carbon.identity.auth.rest org.wso2.carbon.identity.cors.valve - + + 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/pom.xml b/pom.xml index a16a6424..50127c7c 100644 --- a/pom.xml +++ b/pom.xml @@ -249,7 +249,12 @@ ${h2database.version} test - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + @@ -284,7 +289,26 @@ false - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + + @@ -332,6 +356,25 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + @@ -436,5 +479,6 @@ 2.1.210 - + 0.8.6 +