[Merge/#159] feature-member 브랜치 병합(회원탈퇴 서비스) #198
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |