Skip to content

Commit a33e2f8

Browse files
committed
test(workflow):workflow working
1 parent 12ff5f8 commit a33e2f8

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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

0 commit comments

Comments
 (0)