Skip to content

chore-be: prod 환경 docker-compose.prod.yml 수정 #215

chore-be: prod 환경 docker-compose.prod.yml 수정

chore-be: prod 환경 docker-compose.prod.yml 수정 #215

name: BE/CI - Test Coverage 검증
on:
workflow_dispatch:
pull_request:
types: [opened, ready_for_review]
branches:
- be/develop
- be/main
- 'be-**'
env:
Dobby-Kim: "U07BJABU6G1"
U07BJABU6G1: "BE팀 도비"
Chocochip101: "U07BUEJDS8G"
U07BUEJDS8G: "BE팀 초코칩"
xogns1514: "U07AZ26UC2J"
U07AZ26UC2J: "BE팀 러쉬"
cutehumanS2: "U07B88ZQDU4"
U07B88ZQDU4: "BE팀 냥인"
HyungHoKim00: "U07B5HBKZM1"
U07B5HBKZM1: "BE팀 명오"
jobs:
test-coverage-pr-opened:
defaults:
run:
working-directory: ./backend
if: startsWith(github.head_ref, 'be-')
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-write-only: true
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests and generate coverage report
env:
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
run: ./gradlew test jacocoTestReport
continue-on-error: true
- name: Verify test coverage
env:
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
run: ./gradlew jacocoTestCoverageVerification
continue-on-error: true
- name: 테스트 커버리지를 PR에 코멘트로 등록
uses: madrapps/[email protected]
with:
title: 📌 Test Coverage Report
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80