[SAMBAD-158]- 테스트 커버리지 70% 넘으면 워크플로우 통과 CI 작업 #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check test coverage and merge | |
on: | |
pull_request: | |
branches: [ main, develop ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "GitHub 에서 레포 받아오기" | |
uses: actions/checkout@v3 | |
- name: "JDK17 준비하기" | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: "Gradle 준비하기" | |
run: chmod +x gradlew | |
- name: "Gradle 빌드" | |
run: ./gradlew build jacocoTestReport -x test | |
- name: "Codecov에 커버리지 업로드" | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: "테스트 커버리지를 PR에 코멘트로 등록" | |
id: jacoco | |
uses: madrapps/[email protected] | |
with: | |
title: 📝 테스트 커버리지 리포트입니다 | |
paths: /build/reports/jacoco/test/jacocoTestReport.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 70 | |
min-coverage-changed-files: 70 |