Skip to content

Commit

Permalink
set up code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynafs authored and kibettheophilus committed Jun 14, 2024
1 parent ab4ed3b commit 5eb422f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,19 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run tests with coverage
run: ./gradlew debugCoverage


- name: Upload test results
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: "${{ github.workspace }}/**/build/reports/tests"
path: "build/reports/tests"

- name: Upload jacoco report
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: "${{ github.workspace }}/**/build/reports/jacoco"
path: "build/reports/jacoco"
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ subprojects {
tasks.register<JacocoReport>("debugCoverage") {
group = "Reporting"
description = "Generate Jacoco coverage reports for the debug build."
dependsOn("testDebugUnitTest")
reports {
xml.required.set(true)
html.required.set(true)
}
}

}

0 comments on commit 5eb422f

Please sign in to comment.