Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(actions-CI): checkout repo dir 수정 #127

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/be-ci-pr-code-coverage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
path: backend

- name: Set up JDK 17
uses: actions/setup-java@v3
Expand All @@ -26,7 +28,7 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/backend/.gradle/wrapper
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
Expand All @@ -35,32 +37,32 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/backend/.gradle/caches
~/backend/.gradle/wrapper
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle.properties', '**/gradle-wrapper.properties', '**/settings.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Grant execute permission for gradlew
run: chmod +x ./backend/gradlew
run: chmod +x ./gradlew

- name: Run tests and generate coverage report
env:
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
run: ./backend/gradlew test jacocoTestReport
run: ./gradlew test jacocoTestReport
continue-on-error: true

- name: Verify test coverage
env:
JAVA_HOME: ${{ steps.setup-java.outputs.java-home }}
run: ./backend/gradlew jacocoTestCoverageVerification
run: ./gradlew jacocoTestCoverageVerification
continue-on-error: true

- name: 테스트 커버리지를 PR에 코멘트로 등록
uses: madrapps/jacoco-report@v1.6.1
with:
title: 📌 Test Coverage Report
paths: ${{ github.workspace }}/**//backend/build/reports/jacoco/test/jacocoTestReport.xml
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
Loading