Repository navigation
Merge pull request #23 from 8th-COKERTHON/feat/mission-final #49
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: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # 테스트는 실제 PostgreSQL 로 돈다. | |
| # application.yml 의 기본 DB_URL 이 localhost:5433 이므로 호스트 포트를 5433 으로 맞춘다. | |
| services: | |
| postgres: | |
| image: postgres:18-alpine | |
| env: | |
| POSTGRES_DB: hackathon | |
| POSTGRES_USER: hackathon | |
| POSTGRES_PASSWORD: hackathon | |
| ports: | |
| - 5433:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U hackathon -d hackathon" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build & Test | |
| run: ./gradlew clean build |