Skip to content

Commit

Permalink
build: jacoco, codecov 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wonjunYou committed Sep 22, 2023
1 parent 1653f7e commit 4a98d63
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ddingdong-dev-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- develop # develop에 push될 때 실행

pull_request:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -69,3 +73,12 @@ jobs:
region: ap-northeast-2
deployment_package: deploy/deploy.zip
wait_for_environment_recovery: 180

- name: Test with Gradle
run: ./gradlew test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
file: ./build/reports/jacoco/test/jacocoTestReport.xml
17 changes: 17 additions & 0 deletions 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 '2.7.12'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'jacoco'
}

group = 'ddingdong'
Expand Down Expand Up @@ -45,3 +46,19 @@ dependencies {
tasks.named('test') {
useJUnitPlatform()
}

jacoco {
toolVersion = '0.8.10'
}

test {
finalizedBy jacocoTestReport
}

jacocoTestReport {
reports {
html.enabled true
xml.enabled true
csv.enabled true
}
}
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
codecov:
require_ci_to_pass: yes

comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: false
branches:
- develop
- main

0 comments on commit 4a98d63

Please sign in to comment.