Skip to content

Commit

Permalink
feature: add code coverage report (thousandeyes#83)
Browse files Browse the repository at this point in the history
add code coverage report to PR
  • Loading branch information
brumarqu-te authored Sep 27, 2024
1 parent 19382a2 commit 894a5e1
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@ name: Java CI with Gradle
on:
push:
branches: [ "main" ]
pull_request:
pull_request_target:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle
run: gradle clean build --warning-mode none --parallel
- name: Build with Gradle
run: gradle clean build test --warning-mode none --parallel

- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.7.1
with:
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/*.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60

0 comments on commit 894a5e1

Please sign in to comment.