Skip to content

Commit

Permalink
Merge pull request #49 from DKU-Dgaja/chore-jacoco-coverage
Browse files Browse the repository at this point in the history
[CI] chore jacoco coverage
  • Loading branch information
ghdcksgml1 authored Jan 20, 2024
2 parents 6e9d581 + 6a5dad6 commit 826e4bf
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/CI_dev_be_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,16 @@ jobs:
- name: yaml 파일 변경
run: |
echo "${{ secrets.APPLICATION_DEFAULT_DEV }}" > ./backend/src/main/resources/application.yml
coverage:
runs-on: self-hosted
steps:
- name: 테스트 커버리지를 PR에 코멘트로 등록합니다
id: jacoco
uses: madrapps/[email protected]
with:
title: 📝 테스트 커버리지 리포트
paths: ${{ github.workspace }}/backend/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 50
min-coverage-changed-files: 50
18 changes: 18 additions & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.2.1'
id 'io.spring.dependency-management' version '1.1.4'
id 'jacoco'
}

group = 'com.example'
Expand Down Expand Up @@ -67,3 +68,20 @@ dependencies {
tasks.named('test') {
useJUnitPlatform()
}

test {
finalizedBy jacocoTestReport
}

jacoco {
toolVersion = "0.8.11" // 버전 명시
}

jacocoTestReport {
dependsOn test
reports {
xml.required.set(true)
csv.required.set(false)
html.required.set(true)
}
}

0 comments on commit 826e4bf

Please sign in to comment.