[BOM-1163] refactor: 테스트 코드 개선 #1310
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 requset - dev | |
| on: | |
| pull_request: | |
| types: [ opened, edited, synchronize ] | |
| branches: | |
| - server-dev | |
| jobs: | |
| dev-test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./backend/bom-bom-server | |
| steps: | |
| - name: Github Repository 파일 불러오기 | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: JDK v21 설치 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: 설정 파일 생성(메인/테스트) | |
| shell: bash | |
| env: | |
| APPLICATION_MAIN_PROPERTIES: ${{ secrets.APPLICATION_MAIN_PROPERTIES }} | |
| APPLICATION_TEST_PROPERTIES: ${{ secrets.APPLICATION_TEST_PROPERTIES }} | |
| run: | | |
| mkdir -p src/main/resources src/test/resources | |
| printf '%s' "$APPLICATION_MAIN_PROPERTIES" > src/main/resources/application.yml | |
| printf '%s' "$APPLICATION_TEST_PROPERTIES" > src/test/resources/application.yml | |
| - name: 빌드 및 테스트 | |
| shell: bash | |
| env: | |
| SPRING_PROFILES_ACTIVE: test | |
| APPLE_P8_ESCAPED: ${{ secrets.APPLE_P8_ESCAPED }} | |
| run: | | |
| export OAUTH2_APPLE_PRIVATE_KEY="$(printf '%b' "$APPLE_P8_ESCAPED")" | |
| ./gradlew clean build --no-daemon | |
| - name: 테스트 리포트 생성 | |
| uses: dorny/test-reporter@v1 | |
| if: always() | |
| with: | |
| name: JUnit Test Report | |
| path: backend/bom-bom-server/build/test-results/test/*.xml | |
| reporter: java-junit |