Skip to content

[OING-67] feat: 피드 업로드 API 모킹 #71

[OING-67] feat: 피드 업로드 API 모킹

[OING-67] feat: 피드 업로드 API 모킹 #71

Workflow file for this run

name: 테스트 커버리지 워크플로우
on:
pull_request:
branches:
- master
- dev
- 'release/**'
env:
COVERAGE_PERCENT: 30
jobs:
measure:
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 애드온 준비하기
uses: gradle/gradle-build-action@v2
- name: 커버리지 측정하기
run: |
chmod +x gradlew
./gradlew --info testCodeCoverageReport
- name: 테스트 결과 업로드
uses: EnricoMi/publish-unit-test-result-action@v2
if: ${{ always() }}
with:
files: |
common/build/test-results/**/*.xml
gateway/build/test-results/**/*.xml
member/build/test-results/**/*.xml
- name: 커버리지 결과 PR에 업로드
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/gateway/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: ${{ env.COVERAGE_PERCENT }}
debug-mode: false
title: Code Coverage
update-comment: true
- name: 테스트 커버리지 미달시 워크플로우 블로킹
if: ${{ steps.jacoco.outputs.coverage-overall < env.COVERAGE_PERCENT }}
uses: actions/github-script@v6
with:
script: |
core.setFailed('전체 커버리지가 ${{ env.COVERAGE_PERCENT }}% 미만입니다!')