File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : TestCase Coverage Check
2+ on :
3+ pull_request_target :
4+
5+
6+ permissions :
7+ contents : read
8+ pull-requests : write
9+ actions : read
10+
11+ jobs :
12+ Build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ with :
18+ ref : ${{ github.event.pull_request.head.sha }}
19+ fetch-depth : 0
20+
21+ - name : Setup JDK 17
22+ uses : actions/setup-java@v4
23+ with :
24+ java-version : ' 17'
25+ distribution : ' temurin'
26+
27+ - name : Build with Maven
28+ run : mvn clean verify
29+
30+ - name : Upload JaCoCo Report Artifact
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : jacoco-report
34+ path : target/site/jacoco/jacoco.xml
35+ if-no-files-found : warn
36+
37+ - name : Compare JaCoCo Coverage
38+ uses : madrapps/jacoco-report@v1.7.2
39+ with :
40+ paths : ${{ github.workspace }}/target/site/jacoco/jacoco.xml
41+ token : ${{ secrets.GITHUB_TOKEN }}
42+ min-coverage-overall : 0
43+ title : Code Coverage Report
44+ comment-type : pr_comment
You can’t perform that action at this time.
0 commit comments