Skip to content

refactor: GitHub Actions 워크플로우 최적화 완료 #25

refactor: GitHub Actions 워크플로우 최적화 완료

refactor: GitHub Actions 워크플로우 최적화 완료 #25

Workflow file for this run

name: Test Spring Boot with Gradle
on:
pull_request:
permissions:
pull-requests: write
contents: read
actions: read
checks: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java and Gradlew
uses: ./.github/actions/setup-java-and-gradlew
with:
java-distribution: 'liberica'
java-version: '21'
java-package: 'jdk'
- name: Run tests with Gradle
run: ./gradlew test -Dspring.profiles.active=test --info --parallel
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: '**/build/reports/tests/test/*'
- name: Test Reporter
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Spring Boot Tests
path: '**/build/test-results/test/*.xml'
reporter: java-junit
only-summary: false
list-suites: all
list-tests: all
max-annotations: 50
fail-on-error: true
fail-on-empty: true
- name: Add Test Results to PR
uses: marocchino/sticky-pull-request-comment@v2
with:
header: Test Results
recreate: true
message: |
### 🛠️ Test Summary
- Total Tests: ${{steps.reporter.outputs.passed}} + ${{steps.reporter.outputs.failed}} + ${{steps.reporter.outputs.skipped}}
- ✅ Passed: ${{ steps.reporter.outputs.passed }}
- ❌ Failed: ${{ steps.reporter.outputs.failed }}
- ⚠️ Skipped: ${{ steps.reporter.outputs.skipped }}
- ⏱️ Time: ${{ steps.reporter.outputs.time }}ms
- 📄 [View Test Logs](https://github.com/${{ github.repository }}/runs/${{ github.run_id }})