File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : TestCase Coverage Check
2- on :
3- pull_request_target :
42
3+ on :
4+ pull_request :
5+ types : [opened, synchronize]
56
6- permissions :
7- contents : read
8- pull-requests : write
9- actions : read
7+ permissions : {}
108
119jobs :
12- Build :
10+ build_and_check_coverage :
1311 runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+
1415 steps :
1516 - name : Checkout code
1617 uses : actions/checkout@v4
17- with :
18- ref : ${{ github.event.pull_request.head.sha }}
19- fetch-depth : 0
2018
2119 - name : Setup JDK 17
2220 uses : actions/setup-java@v4
2321 with :
2422 java-version : ' 17'
2523 distribution : ' temurin'
2624
25+ - name : Cache Maven dependencies
26+ uses : actions/cache@v3
27+ with :
28+ path : ~/.m2
29+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
30+ restore-keys : |
31+ ${{ runner.os }}-m2-
32+
2733 - name : Build with Maven
2834 run : mvn clean verify
2935
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
36+ - name : Run Coverage Check
3837 uses : madrapps/jacoco-report@v1.7.2
3938 with :
40- paths : ${{ github.workspace }}/ target/site/jacoco/jacoco.xml
39+ paths : target/site/jacoco/jacoco.xml
4140 token : ${{ secrets.GITHUB_TOKEN }}
42- min-coverage-overall : 0
41+ min-coverage-overall : 40
42+ min-coverage-changed-files : 60
4343 title : Code Coverage Report
44- comment-type : pr_comment
44+ comment-type : pr_comment
You can’t perform that action at this time.
0 commit comments