chore: Github Actions CI 추가 - PR/PUSH 시 테스트 자동 실행 #1
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: CI | |
| on: | |
| pull_request: | |
| branches: [dev, main] | |
| push: | |
| branches: [dev, main] | |
| # 같은 PR에 커밋을 연달아 푸시하면 이전 실행을 취소 (러너 시간 절약) | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| # Gradle 의존성·빌드 캐시 자동 관리 (두 번째 실행부터 빨라짐) | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Run tests | |
| run: ./gradlew test | |
| # ubuntu-latest 러너는 Docker 기본 탑재 → Testcontainers E2E가 그대로 동작 | |
| # 실패 시 테스트 리포트를 아티팩트로 업로드 (Actions 탭에서 다운로드해 원인 확인) | |
| - name: Upload test report | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-report | |
| path: build/reports/tests/test/ | |
| retention-days: 7 |