알림 서비스 강결합 분리 및 비동기 처리 #222
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
name: 블리츠 백엔드 서버 CI | |
on: | |
pull_request: | |
branches: | |
- main | |
- dev | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
steps: | |
- name: 대상 레포지토리 체크아웃 | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GIT_TOKEN }} | |
submodules: 'true' | |
- name: JDK 17 설치 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: gradlew 권한 부여 | |
run: chmod +x ./gradlew | |
shell: bash | |
- name: 빌드 & 테스트 | |
run: ./gradlew build test | |
- name: 테스트 결과를 PR 코멘트에 등록 | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: '**/build/test-results/test/TEST-*.xml' | |
- name: 테스트 실패 시 Check 코멘트 등록. | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
- name: CI가 종료되면 Slack으로 알림 | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: CI 결과 알림 | |
fields: repo, message, commit, author, action, eventName, ref, workflow, job, took | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
if: always() | |