From c88e3fc56153d91aa0d39e838385e16c2cb1c5f7 Mon Sep 17 00:00:00 2001 From: ryuwldnjs Date: Mon, 16 Feb 2026 18:16:19 +0900 Subject: [PATCH 1/7] =?UTF-8?q?ci:=20JaCoCo=20=EC=BB=A4=EB=B2=84=EB=A6=AC?= =?UTF-8?q?=EC=A7=80=20=EC=B8=A1=EC=A0=95=20=EB=B0=8F=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EB=A6=AC=ED=8F=AC=ED=8A=B8=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 32 +++++++++++++++++++++++++++----- build.gradle | 10 ++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fc09f8..09a4529 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,10 +27,32 @@ jobs: - name: Gradle 실행 권한 부여 run: chmod +x gradlew - - name: Gradle 빌드 - run: ./gradlew build -x test - - - name: 테스트 실행 - run: ./gradlew test + - name: 빌드 및 테스트 + run: ./gradlew build env: SPRING_PROFILES_ACTIVE: test + + - name: 테스트 결과 업로드 + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results + path: build/reports/tests/test/ + + - name: 커버리지 리포트 업로드 + if: always() + uses: actions/upload-artifact@v4 + with: + name: coverage-report + path: build/reports/jacoco/test/ + + - name: PR 커버리지 댓글 + if: github.event_name == 'pull_request' + uses: madrapps/jacoco-report@v1.7.1 + with: + paths: build/reports/jacoco/test/jacocoTestReport.xml + token: ${{ secrets.GITHUB_TOKEN }} + title: "📊 테스트 커버리지 리포트" + update-comment: true + min-coverage-overall: 0 + min-coverage-changed-files: 0 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 1690c21..7cb8a12 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java' + id 'jacoco' id 'org.springframework.boot' version '3.2.0' id 'io.spring.dependency-management' version '1.1.7' } @@ -88,4 +89,13 @@ dependencies { tasks.named('test') { useJUnitPlatform() + finalizedBy jacocoTestReport +} + +jacocoTestReport { + dependsOn test + reports { + xml.required = true + html.required = true + } } From c7cd28539384e30c0d4cc4dc603d7f7d318e3a62 Mon Sep 17 00:00:00 2001 From: ryuwldnjs Date: Mon, 16 Feb 2026 18:22:53 +0900 Subject: [PATCH 2/7] =?UTF-8?q?ci:=20GITHUB=5FTOKEN=EC=97=90=20pull-reques?= =?UTF-8?q?ts=20write=20=EA=B6=8C=ED=95=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09a4529..3c4cda8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,10 @@ on: - dev - main +permissions: + contents: read + pull-requests: write + jobs: build-and-test: runs-on: ubuntu-latest From 035ea206bbe3b1159677c9f4cf4c498734d5d6ad Mon Sep 17 00:00:00 2001 From: ryuwldnjs Date: Mon, 16 Feb 2026 18:24:05 +0900 Subject: [PATCH 3/7] =?UTF-8?q?ci:=20madrapps/jacoco-report=20v1.7.1=20?= =?UTF-8?q?=E2=86=92=20v1.7.2=20=EC=97=85=EA=B7=B8=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c4cda8..ee03d5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: - name: PR 커버리지 댓글 if: github.event_name == 'pull_request' - uses: madrapps/jacoco-report@v1.7.1 + uses: madrapps/jacoco-report@v1.7.2 with: paths: build/reports/jacoco/test/jacocoTestReport.xml token: ${{ secrets.GITHUB_TOKEN }} From 38eefbedac77ae2446ccb15795572d74c59c34f7 Mon Sep 17 00:00:00 2001 From: ryuwldnjs Date: Mon, 16 Feb 2026 18:25:20 +0900 Subject: [PATCH 4/7] =?UTF-8?q?ci:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=8B=A4=ED=8C=A8=20=EB=A6=AC=ED=8F=AC=ED=8A=B8=20=ED=99=95?= =?UTF-8?q?=EC=9D=B8=EC=9A=A9=20=EC=9E=84=EC=8B=9C=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ryu/studyhelper/CiFailureTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/test/java/com/ryu/studyhelper/CiFailureTest.java diff --git a/src/test/java/com/ryu/studyhelper/CiFailureTest.java b/src/test/java/com/ryu/studyhelper/CiFailureTest.java new file mode 100644 index 0000000..3d2662b --- /dev/null +++ b/src/test/java/com/ryu/studyhelper/CiFailureTest.java @@ -0,0 +1,13 @@ +package com.ryu.studyhelper; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.fail; + +class CiFailureTest { + + @Test + void 의도적_실패_테스트() { + fail("CI 테스트 실패 리포트 확인용"); + } +} \ No newline at end of file From 9f65a8a7f8011cb3a521aed35f93afb744af0516 Mon Sep 17 00:00:00 2001 From: ryuwldnjs Date: Mon, 16 Feb 2026 18:28:42 +0900 Subject: [PATCH 5/7] =?UTF-8?q?ci:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EA=B2=B0=EA=B3=BC=20PR=20=EB=8C=93=EA=B8=80=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20=EC=8B=A4=ED=8C=A8=20=EC=8B=9C=EC=97=90?= =?UTF-8?q?=EB=8F=84=20=EB=A6=AC=ED=8F=AC=ED=8A=B8=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee03d5e..9d0f414 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ on: permissions: contents: read + checks: write pull-requests: write jobs: @@ -50,8 +51,15 @@ jobs: name: coverage-report path: build/reports/jacoco/test/ + - name: 테스트 결과 댓글 + if: always() && github.event_name == 'pull_request' + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: build/test-results/test/*.xml + comment_title: "🧪 테스트 결과" + - name: PR 커버리지 댓글 - if: github.event_name == 'pull_request' + if: always() && github.event_name == 'pull_request' uses: madrapps/jacoco-report@v1.7.2 with: paths: build/reports/jacoco/test/jacocoTestReport.xml From 845938adf7cce4c0b745de869ef2f839bdb19c1b Mon Sep 17 00:00:00 2001 From: ryuwldnjs Date: Mon, 16 Feb 2026 18:33:47 +0900 Subject: [PATCH 6/7] =?UTF-8?q?ci:=20=EC=BB=A4=EB=B2=84=EB=A6=AC=EC=A7=80?= =?UTF-8?q?=20PR=20=EB=8C=93=EA=B8=80=20=EC=A0=9C=EA=B1=B0,=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EA=B2=B0=EA=B3=BC=20=EB=8C=93=EA=B8=80?= =?UTF-8?q?=EB=A7=8C=20=EC=9C=A0=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d0f414..aacddb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,15 +56,4 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v2 with: files: build/test-results/test/*.xml - comment_title: "🧪 테스트 결과" - - - name: PR 커버리지 댓글 - if: always() && github.event_name == 'pull_request' - uses: madrapps/jacoco-report@v1.7.2 - with: - paths: build/reports/jacoco/test/jacocoTestReport.xml - token: ${{ secrets.GITHUB_TOKEN }} - title: "📊 테스트 커버리지 리포트" - update-comment: true - min-coverage-overall: 0 - min-coverage-changed-files: 0 \ No newline at end of file + comment_title: "🧪 테스트 결과" \ No newline at end of file From dfd95fb05b09e7cdde093d95a13e3724fe8b0354 Mon Sep 17 00:00:00 2001 From: ryuwldnjs Date: Mon, 16 Feb 2026 18:35:53 +0900 Subject: [PATCH 7/7] =?UTF-8?q?ci:=20=EC=9D=98=EB=8F=84=EC=A0=81=20?= =?UTF-8?q?=EC=8B=A4=ED=8C=A8=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ryu/studyhelper/CiFailureTest.java | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 src/test/java/com/ryu/studyhelper/CiFailureTest.java diff --git a/src/test/java/com/ryu/studyhelper/CiFailureTest.java b/src/test/java/com/ryu/studyhelper/CiFailureTest.java deleted file mode 100644 index 3d2662b..0000000 --- a/src/test/java/com/ryu/studyhelper/CiFailureTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.ryu.studyhelper; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.fail; - -class CiFailureTest { - - @Test - void 의도적_실패_테스트() { - fail("CI 테스트 실패 리포트 확인용"); - } -} \ No newline at end of file