Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] chore: CI 구축 #87

Merged
merged 7 commits into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/backend-pull-request-ci.yml
Original file line number Diff line number Diff line change
@@ -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'


Comment on lines +60 to +61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

띄어쓰기 두 줄 되어있는거 불~편 하네요

- name: 실패 테스트결과의 원인을 Report 합니다
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: './backend/build/test-results/test/TEST-*.xml'
token: ${{ github.token }}