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 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% 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 3c198af..5fb4a7b 100644 --- a/pom.xml +++ b/pom.xml @@ -172,6 +172,16 @@ org.wso2.carbon.identity.multi.attribute.login.mgt ${carbon.identity.framework.version} + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + @@ -209,6 +219,44 @@ + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + @@ -250,7 +298,26 @@ - + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + + prepare-agent + + + + report + test + + report + + + + + @@ -296,5 +363,7 @@ 1.10.1 UTF-8 + + 0.8.12