[DP-233] StringListConverter 단위 테스트 추가 #213
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: Backend CI | |
| on: | |
| pull_request: | |
| branches: | |
| - developV2 | |
| jobs: | |
| build-test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_DB: devpick_test | |
| POSTGRES_USER: devpick | |
| POSTGRES_PASSWORD: devpick | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build & Test | |
| run: ./gradlew build --no-daemon | |
| env: | |
| SPRING_PROFILES_ACTIVE: test | |
| DB_HOST: localhost | |
| DB_PORT: 5432 | |
| DB_NAME: devpick_test | |
| DB_USERNAME: devpick | |
| DB_PASSWORD: devpick | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| AWS_REGION: us-east-1 | |
| JWT_SECRET: ${{ secrets.JWT_SECRET_TEST }} | |
| RESEND_API_KEY: test-api-key | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: test-results | |
| path: build/reports/tests/ | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: build-artifacts | |
| path: | | |
| build/classes/ | |
| build/reports/jacoco/ | |
| sonar: | |
| name: SonarCloud Quality Gate | |
| # SonarCloud Free는 커스텀 Quality Gate 할당 불가 → Sonar way(80%) 유지. | |
| # PR 블로킹 완화: 분석은 업로드하되 QG 실패로 워크플로 전체를 실패시키지 않음. | |
| continue-on-error: true | |
| runs-on: ubuntu-latest | |
| needs: build-test | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_DB: devpick_test | |
| POSTGRES_USER: devpick | |
| POSTGRES_PASSWORD: devpick | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-artifacts | |
| path: build/ | |
| - name: SonarCloud Scan | |
| run: ./gradlew sonar --no-daemon -Dsonar.qualitygate.wait=false | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SPRING_PROFILES_ACTIVE: test | |
| DB_HOST: localhost | |
| DB_PORT: 5432 | |
| DB_NAME: devpick_test | |
| DB_USERNAME: devpick | |
| DB_PASSWORD: devpick | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| AWS_REGION: us-east-1 | |
| JWT_SECRET: ${{ secrets.JWT_SECRET_TEST }} | |
| RESEND_API_KEY: test-api-key |