Skip to content

Commit

Permalink
feat: 테스트 커버리지 측정 자동화
Browse files Browse the repository at this point in the history
  • Loading branch information
peeerr committed Nov 14, 2024
1 parent 77266cf commit b8b93d1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pr_weekly_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,19 @@ jobs:
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
token: ${{ github.token }}

- name: JaCoCo 테스트 커버리지 리포트 업로드
uses: actions/upload-artifact@v3
if: always()
with:
name: jacoco-report
path: '**/build/reports/jacoco/'

- name: JaCoCo 테스트 커버리지 결과를 PR에 코멘트로 등록
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ github.token }}
min-coverage-overall: 80
min-coverage-changed-files: 80
title: '📊 테스트 커버리지 리포트'
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.3.3'
id 'io.spring.dependency-management' version '1.1.6'
}
Expand Down Expand Up @@ -51,3 +52,14 @@ dependencies {
tasks.named('test') {
useJUnitPlatform()
}

jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}

test {
finalizedBy jacocoTestReport
}

0 comments on commit b8b93d1

Please sign in to comment.