From 4818b9a78e7aba217a33126ad6c19e95309e51a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8F=84=EC=84=A0?= Date: Wed, 17 Jul 2024 16:11:48 +0900 Subject: [PATCH] =?UTF-8?q?[BE]=20chore:=20CI=20=EA=B5=AC=EC=B6=95=20(#87)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backend-pull-request-ci.yml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/backend-pull-request-ci.yml diff --git a/.github/workflows/backend-pull-request-ci.yml b/.github/workflows/backend-pull-request-ci.yml new file mode 100644 index 000000000..0fb23acab --- /dev/null +++ b/.github/workflows/backend-pull-request-ci.yml @@ -0,0 +1,67 @@ +name: backend-ci + +on: + push: + branches: [ "develop" ] + paths: + - 'backend/**' + pull_request: + branches: [ "develop" ] + paths: + - 'backend/**' + +defaults: + run: + working-directory: ./backend + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + checks: write + + # needed unless run with comment_mode: off + pull-requests: write + + # only needed for private repository + contents: read + + # only needed for private repository + issues: read + + # required by download step to access artifacts API + actions: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'corretto' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-version: 8.1.1 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle Wrapper + run: ./gradlew build + + - name: 테스트 결과를 PR에 코멘트로 등록합니다 + uses: EnricoMi/publish-unit-test-result-action@v1 + if: always() + with: + files: './backend/build/test-results/test/TEST-*.xml' + + + - name: 실패 테스트결과의 원인을 Report 합니다 + uses: mikepenz/action-junit-report@v3 + if: always() + with: + report_paths: './backend/build/test-results/test/TEST-*.xml' + token: ${{ github.token }}