♻️refractor: 조회 기능 수정 #67
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: | |
| - develop # develop 브랜치로 PR이 올라온 경우로 제한 | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| pr_merge_and_build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set Git identity | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "CI Runner" | |
| # PR 브랜치 체크아웃 | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| fetch-depth: 0 | |
| # Java 환경설정 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'adopt' | |
| # Gradle 권한부여 | |
| - name: Grant execute permission fom gradlew | |
| run: chmod +x gradlew | |
| # 현재 브랜치만 빌드 테스트 | |
| - name: Build jar | |
| run: ./gradlew clean compileJava -x test | |
| # 현재 브랜치 + develop 병합 테스트 | |
| - name: Test merge with develop branch | |
| run: | | |
| git fetch origin main | |
| git merge origin/main --no-commit --no-ff || { echo "현재 브랜치는 develop 브랜치와 병합시 conflict가 발생합니다."; exit 1; } | |
| # 병합 후 최종 빌드 테스트 | |
| - name: Build jar | |
| run: ./gradlew clean compileJava -x test |