배포 워크플로에 애플리케이션 헬스체크 스크립트 추가 #232
Workflow file for this run
This file contains hidden or 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: LetsRecordIt Server CI with Gradle | |
| on: | |
| pull_request: | |
| branches: [ "develop" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| services: | |
| neo4j: | |
| image: neo4j:5.24 | |
| ports: | |
| - 7687:7687 | |
| - 7474:7474 | |
| env: | |
| NEO4J_AUTH: neo4j/verysecret | |
| options: >- | |
| --health-cmd "cypher-shell -u neo4j -p verysecret 'RETURN 1'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'zulu' | |
| - name: Run Redis | |
| uses: supercharge/redis-github-action@1.1.0 | |
| with: | |
| redis-version: 6 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Test with Gradle Wrapper | |
| run: ./gradlew clean spotlessCheck test | |
| env: | |
| NEO4J_URI: bolt://localhost:7687 | |
| NEO4J_USER: neo4j | |
| NEO4J_PASSWORD: verysecret | |
| - name: Send Notification to Discord | |
| uses: sarisia/actions-status-discord@v1.14.0 | |
| if: always() # 배포 결과 Discord 전송 | |
| with: | |
| webhook: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
| dependency-submission: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'zulu' | |
| - name: Generate and submit dependency graph | |
| uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 |