-
Notifications
You must be signed in to change notification settings - Fork 50
40 lines (35 loc) · 1.22 KB
/
pr_code_coverage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: pr_code_coverage
on:
pull_request:
branches:
- main
types: [opened, reopened, synchronize]
jobs:
code-coverage:
runs-on: ubuntu-latest
name: Generate code coverage report
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup JDK environment
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 17
cache: 'gradle'
- name: Generate coverage report
run: ./gradlew jacocoCoreDebugCodeCoverage
- name: Add coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: |
${{ github.workspace }}/**/build/reports/jacoco/jacocoCoreDebugCodeCoverage/jacocoCoreDebugCodeCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60
title: Code Coverage
update-comment: true
debug-mode: true