From e0074dde72e6521869beeb7fc7f293b0e40733e3 Mon Sep 17 00:00:00 2001 From: JunHyeongChoi Date: Thu, 14 Nov 2024 22:30:46 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BB=A4?= =?UTF-8?q?=EB=B2=84=EB=A6=AC=EC=A7=80=20=EC=B5=9C=EC=86=8C=20=EA=B8=B0?= =?UTF-8?q?=EC=A4=80=20=EB=AA=85=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_weekly_ci.yml | 2 ++ build.gradle | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/pr_weekly_ci.yml b/.github/workflows/pr_weekly_ci.yml index a2fc914..372f0ca 100644 --- a/.github/workflows/pr_weekly_ci.yml +++ b/.github/workflows/pr_weekly_ci.yml @@ -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: '📊 테스트 커버리지 리포트' diff --git a/build.gradle b/build.gradle index 4e12aab..8c803bb 100644 --- a/build.gradle +++ b/build.gradle @@ -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 + } + } + } +}