File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 49
49
- name : yaml 파일 변경
50
50
run : |
51
51
echo "${{ secrets.APPLICATION_DEFAULT_DEV }}" > ./backend/src/main/resources/application.yml
52
+
53
+ coverage :
54
+ runs-on : self-hosted
55
+ steps :
56
+ - name : 테스트 커버리지를 PR에 코멘트로 등록합니다
57
+ id : jacoco
58
+
59
+ with :
60
+ title : 📝 테스트 커버리지 리포트
61
+ paths : ${{ github.workspace }}/backend/build/reports/jacoco/test/jacocoTestReport.xml
62
+ token : ${{ secrets.GITHUB_TOKEN }}
63
+ min-coverage-overall : 50
64
+ min-coverage-changed-files : 50
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ plugins {
2
2
id ' java'
3
3
id ' org.springframework.boot' version ' 3.2.1'
4
4
id ' io.spring.dependency-management' version ' 1.1.4'
5
+ id ' jacoco'
5
6
}
6
7
7
8
group = ' com.example'
@@ -67,3 +68,20 @@ dependencies {
67
68
tasks. named(' test' ) {
68
69
useJUnitPlatform()
69
70
}
71
+
72
+ test {
73
+ finalizedBy jacocoTestReport
74
+ }
75
+
76
+ jacoco {
77
+ toolVersion = " 0.8.11" // 버전 명시
78
+ }
79
+
80
+ jacocoTestReport {
81
+ dependsOn test
82
+ reports {
83
+ xml. required. set(true )
84
+ csv. required. set(false )
85
+ html. required. set(true )
86
+ }
87
+ }
You can’t perform that action at this time.
0 commit comments