Chore: rating을 실수로 변경 #87
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: Java CI with Gradle | |
| on: | |
| push: | |
| branches: [ "dev" ] | |
| pull_request: | |
| branches: [ "dev" ] | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: rootPw123 # 루트 비번 (미사용이라도 필수) | |
| MYSQL_USER: babzip # 전용 계정 | |
| MYSQL_PASSWORD: babzippass | |
| MYSQL_DATABASE: babzipdb # 자동 생성 DB | |
| ports: | |
| - 3307:3306 # 로컬과 동일한 3307 사용 | |
| options: >- | |
| --health-cmd="mysqladmin ping --silent" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| steps: | |
| # 1) 소스 체크아웃 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # 2) JDK 21 설치 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| # 3) Gradle 캐싱 & 래퍼 사용 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| # 4) gradlew 실행 권한 부여 | |
| - name: Add +x permission to gradlew | |
| run: chmod +x gradlew | |
| # 5) 빌드 + 테스트 (DB 연결 환경변수 주입) | |
| - name: Build with Gradle | |
| run: ./gradlew clean build | |
| env: | |
| SPRING_DATASOURCE_URL: jdbc:mysql://127.0.0.1:3307/babzipdb | |
| SPRING_DATASOURCE_USERNAME: babzip | |
| SPRING_DATASOURCE_PASSWORD: babzippass | |
| SPRING_PROFILES_ACTIVE: prod | |
| # 6) JUnit 결과 리포트 | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v5 | |
| if: success() || failure() | |
| with: | |
| report_paths: '**/build/test-results/test/TEST-*.xml' | |
| # 7) 빌드 산출물 업로드 | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-libs | |
| path: | | |
| build/libs/*.jar | |
| Dockerfile |