Skip to content

fix#106/ hibernate 정보를 액츄에이터로 나타내기 위한 의존성 추가 #146

fix#106/ hibernate 정보를 액츄에이터로 나타내기 위한 의존성 추가

fix#106/ hibernate 정보를 액츄에이터로 나타내기 위한 의존성 추가 #146

Workflow file for this run

name: jacoco-rule
on:
pull_request:
branches: [ main, develop ]
permissions:
pull-requests: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: cd backend && chmod +x gradlew
- name: Build with Gradle
run: cd backend && ./gradlew build
- name: Store error reports
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: reports
path: |
**/build/reports/
**/build/test-results/
- name: Upload Jacoco coverage report
uses: actions/upload-artifact@v2
with:
name: jacoco-report
path: backend/build/reports/jacoco/
- name: Jacoco Report to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/backend/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
title: Code Coverage Report
update-comment: true
- name: Check coverage and fail if below threshold
run: |
overall_coverage=$(echo "${{ steps.jacoco.outputs.coverage-overall }}" | cut -d'.' -f1)
changed_files_coverage=$(echo "${{ steps.jacoco.outputs.coverage-changed-files }}" | cut -d'.' -f1)
if [ $overall_coverage -lt 80 ] || [ $changed_files_coverage -lt 80 ]; then
echo "Coverage is below the required threshold."
echo "Overall coverage: $overall_coverage%"
echo "Changed files coverage: $changed_files_coverage%"
exit 1
fi