diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4aee0ee8..4b01e9a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,3 +95,17 @@ jobs: generate-summary: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Display Coverage Summary JSON + run: | + cat badges/coverage-summary.json + + - name: Extract Coverage Information + if: ${{ github.event_name == 'pull_request' }} + run: | + COVERAGE=$(jq '.coverage' badges/coverage-summary.json) + BRANCH_COVERAGE=$(jq '.branches' badges/coverage-summary.json) + curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -X POST \ + -d "{\"body\": \"### JaCoCo Test Coverage Summary\n- Coverage: ${COVERAGE}%\n- Branches: ${BRANCH_COVERAGE}%\n\n*Generated by jacoco-badge-generator*\"}" \ + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" diff --git a/build.gradle b/build.gradle index 5d238c37..d5def0b7 100644 --- a/build.gradle +++ b/build.gradle @@ -142,6 +142,9 @@ jacocoTestReport { '**/config/**', // config 패키지 제외 '**/exception/**', // exception 패키지 제외 '**/core/**', // core 패키지 제외 + '**/mapper/**', // mapper 패키지 제외 + '**/grpc/**', // grpc 패키지 제외 + '**/log/**', // log 패키지 제외 ]) }) )