hotfix: 배포 CI Redis 의존 테스트를 격리한다 #537
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: Pull-it BE check | |
| on: | |
| push: | |
| branches: [develop] | |
| paths: ["src/**", "gradle/**", "build.gradle", "settings.gradle", "Dockerfile", ".github/workflows/ci.yml", ".github/workflows/cd.yml"] | |
| pull_request: | |
| branches: [develop] | |
| paths: ["src/**", "gradle/**", "build.gradle", "settings.gradle", "Dockerfile", ".github/workflows/ci.yml", ".github/workflows/cd.yml"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| code_check: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| AWS_REGION: ap-northeast-2 | |
| # DB 관련 변수는 빌드/테스트 시 내장 DB를 사용하므로 불필요 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: "21" | |
| distribution: "corretto" | |
| cache: "gradle" | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Check a code with Gradle | |
| run: ./gradlew codeCheck | |
| - name: Build and test without production secrets | |
| run: ./gradlew build --stacktrace --no-daemon | |
| - name: Upload test report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: junit-report | |
| path: build/reports/tests/test |