Skip to content

Commit

Permalink
Enabled JaCoCo report, create an HTML artifact with the code coverage.
Browse files Browse the repository at this point in the history
p.s. plans to use Coverals in future.

Signed-off-by: Vest <[email protected]>
  • Loading branch information
Vest committed Jan 29, 2025
1 parent 01e71ed commit 46cca2b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ jobs:
build/jre
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
${{ runner.os }}-gradle
- name: Build with Gradle Wrapper
run: ./gradlew build test
run: ./gradlew build

- name: Run tests
run: ./gradlew test slowtest

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand All @@ -65,23 +68,21 @@ jobs:
- name: Run Coverage
run: ./gradlew testCoverage

- name: Upload Report
- name: Upload Report to artifacts
uses: actions/upload-artifact@v4
with:
name: report.xml
path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
name: testCoverage
path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/html

- name: Jacoco Report to PR
id: jacoco
uses: madrapps/[email protected]
if: always()
with:
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/testCoverage.xml
${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: '## :construction: JaCoCo Code Coverage'
update-comment: true
debug-mode: true
debug-mode: false

- name: Get the Coverage info
run: |
Expand Down

0 comments on commit 46cca2b

Please sign in to comment.