[Fix] 쿼리 메서드 반환값을 Optional을 List로 수정 #162
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: CI Pipeline | |
| on: | |
| pull_request: | |
| branches: [ "dev", "main" ] | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| env: | |
| DB_URL: ${{ secrets.DB_URL }} | |
| DB_USERNAME: ${{ secrets.DB_USERNAME }} | |
| DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
| SPRING_ACTIVE_PROFILE: ${{ vars.SPRING_ACTIVE_PROFILE }} | |
| JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
| FCM_PROJECT_ID: ${{ secrets.FCM_PROJECT_ID }} | |
| AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| MAIL_PASSWORD: ${{ secrets.MAIL_PASSWORD }} | |
| jobs: | |
| formatting: | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - name: Formatting Code with Google Java Style Guide | |
| uses: axel-op/googlejavaformat-action@v3 | |
| with: | |
| args: "--replace --aosp" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| needs: [formatting] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| # - name: Gradle Caching | |
| # uses: actions/cache@v3 | |
| # with: | |
| # path: | | |
| # ~/.gradle/caches | |
| # ~/.gradle/wrapper | |
| # key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-gradle- | |
| # | |
| # - name: Set up JDK 21 | |
| # uses: actions/setup-java@v3 | |
| # with: | |
| # java-version: '21' | |
| # distribution: 'temurin' | |
| # cache: 'gradle' | |
| - name: Create firebase_admin_sdk_private_key.json from Secrets | |
| run: | | |
| mkdir -p $GITHUB_WORKSPACE/src/main/resources/key | |
| echo "${{ secrets.FIREBASE_ADMIN_SDK_PRIVATE_KEY }}" | base64 --decode > $GITHUB_WORKSPACE/src/main/resources/key/firebase_admin_sdk_private_key.json | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Test with Gradle | |
| run: ./gradlew --info test | |
| - name: Publish Test Report | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() | |
| with: | |
| files: "**/build/test-results/test/TEST-*.xml" | |
| slack-reporting: | |
| runs-on: ubuntu-latest | |
| needs: [ formatting, unit-test ] | |
| env: | |
| formatting-result: ${{ needs.formatting.result }} | |
| unit-test-result: ${{ needs.unit-test.result }} | |
| if: always() | |
| steps: | |
| - name: Determine workflow status | |
| run: | | |
| if [[ "${{ env.formatting-result }}" == "success" && "${{ env.unit-test-result }}" == "success" ]]; then | |
| echo "status=success ✅" >> $GITHUB_ENV | |
| else | |
| echo "status=failure ❌" >> $GITHUB_ENV | |
| fi | |
| - name: Send Slack Notification | |
| uses: slackapi/[email protected] | |
| with: | |
| webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| webhook-type: incoming-webhook | |
| payload: | | |
| blocks: | |
| - type: "section" | |
| text: | |
| type: "mrkdwn" | |
| text: " | |
| *🚀 GitHub Actions CI Workflow 실행 결과*\n | |
| *Result*\n | |
| - *${{ env.status }}*\n | |
| *Repository*\n | |
| - ${{ github.repository }}\n | |
| *PR Name*\n | |
| - ${{ github.event.pull_request.title }}\n | |
| *Branch*\n | |
| - ${{ github.event.pull_request.head.ref }} ➡️ ${{ github.event.pull_request.base.ref }}\n | |
| *Head Commit SHA*\n | |
| - ${{ github.event.pull_request.head.sha }}\n | |
| *PR URL*\n | |
| - ${{ github.event.pull_request.html_url }} | |
| " |