diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index e1e8a94..67ed6ce 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -37,3 +37,11 @@ jobs: # Test project - name: Run tests run: ./gradlew test + + # Upload JaCoCo coverage report to Codecov + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: ./build/reports/jacoco/test/jacocoTestReport.xml + fail_ci_if_error: true + verbose: true \ No newline at end of file diff --git a/README.md b/README.md index 34b81b4..5345a41 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # template-java-API -[![Java CI Gradle build and test](https://github.com/DaJaime/template-java-API/actions/workflows/gradle-build.yml/badge.svg?branch=main)](https://github.com/DaJaime/template-java-API/actions/workflows/gradle-build.yml) \ No newline at end of file +[![Java CI Gradle build and test](https://github.com/DaJaime/template-java-API/actions/workflows/gradle-build.yml/badge.svg?branch=main)](https://github.com/DaJaime/template-java-API/actions/workflows/gradle-build.yml) +[![codecov](https://codecov.io/gh/DaJaime/template-java-API/graph/badge.svg?token=JCB7CC5FWP)](https://codecov.io/gh/DaJaime/template-java-API) \ No newline at end of file