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 c10dee6 commit e0074dd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pr_weekly_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@ jobs:
with:
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ github.token }}
min-coverage-overall: 70
min-coverage-changed-files: 70
title: '📊 테스트 커버리지 리포트'
26 changes: 26 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,38 @@ tasks.named('test') {
}

jacocoTestReport {
dependsOn test // 테스트 실행 후 리포트 생성을 보장

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

afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/dto/**',
'**/entity/**',
'**/config/**',
'**/exception/**',
'**/*Application.class'
])
}))
}
}

test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}

// 테스트 커버리지 최소 기준 설정
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.70
}
}
}
}

0 comments on commit e0074dd

Please sign in to comment.