From b8b93d1ec1d85b86551f74820bd0cda345ef3f32 Mon Sep 17 00:00:00 2001 From: JunHyeongChoi Date: Thu, 14 Nov 2024 22:22:25 +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=B8=A1=EC=A0=95=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_weekly_ci.yml | 16 ++++++++++++++++ build.gradle | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/pr_weekly_ci.yml b/.github/workflows/pr_weekly_ci.yml index f54701f..8714ecc 100644 --- a/.github/workflows/pr_weekly_ci.yml +++ b/.github/workflows/pr_weekly_ci.yml @@ -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/jacoco-report@v1.6.1 + with: + paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml + token: ${{ github.token }} + min-coverage-overall: 80 + min-coverage-changed-files: 80 + title: '📊 테스트 커버리지 리포트' diff --git a/build.gradle b/build.gradle index 98243d9..4e12aab 100644 --- a/build.gradle +++ b/build.gradle @@ -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' } @@ -51,3 +52,14 @@ dependencies { tasks.named('test') { useJUnitPlatform() } + +jacocoTestReport { + reports { + xml.required = true + html.required = true + } +} + +test { + finalizedBy jacocoTestReport +}