Skip to content

[Feat/#66] 학생별 N번 이상 틀린 문제 출력 service 단위 테스트 & 구현 #92

[Feat/#66] 학생별 N번 이상 틀린 문제 출력 service 단위 테스트 & 구현

[Feat/#66] 학생별 N번 이상 틀린 문제 출력 service 단위 테스트 & 구현 #92

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
pull_request:
branches:
- main
- develop
- 'feature-*'
permissions:
contents: read
pull-requests: write
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check Code Formatting
run: ./gradlew spotlessJavaCheck
- name: Build with Gradle
run: ./gradlew clean build -x test -x asciidoctor
- name: Test with Gradle
run: |
TEST_RESULT=$(./gradlew test -x asciidoctor)
if [[ $TEST_RESULT == *"FAILURE"* ]]; then
echo "::error::Unit tests failed. Please check the code and try again."
exit 1
fi
- name: Notify Slack
if: always()
uses: 8398a7/action-slack@v2.6.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
status: ${{ job.status }}
message: |
Job: ${{ github.job }}
Repository: ${{ github.repository }}
Commit: ${{ github.sha }}
Event: ${{ github.event_name }}
Branch: ${{ github.ref }}
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: ${{ always() }}
with:
files: build/test-results/**/*.xml
- name: Prevent merge on failure
if: ${{ failure() }}
run: echo "::set-output name=mergeable::false"