1+ # ###############################################################################
2+ # Copyright (c) 2025 Alibaba Group Holding Ltd.
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+ # ###############################################################################
16+ name : Measure coverage1
17+
18+ on :
19+ pull_request :
20+
21+ jobs :
22+ build :
23+ runs-on : ubuntu-latest
24+ permissions :
25+ pull-requests : write
26+ steps :
27+ - uses : actions/checkout@v4
28+
29+ - name : Set up JDK 1.8
30+ uses : actions/setup-java@v4
31+ with :
32+ java-version : ' 8'
33+ distribution : ' temurin'
34+
35+ - name : Build with Maven and run tests
36+ run : mvn clean test -Ptest-coverage
37+
38+ - name : Generate Jacoco Report
39+ run : mvn jacoco:report
40+
41+ - name : Add coverage to PR
42+ id : jacoco
43+ 44+ with :
45+ paths : |
46+ ${{ github.workspace }}/**/target/site/jacoco/index.html,
47+ ${{ github.workspace }}/**/target/site/jacoco/jacoco.xml
48+ token : ${{ secrets.GITHUB_TOKEN }}
49+ min-coverage-overall : 40
50+ min-coverage-changed-files : 70
0 commit comments