chore(ci): optimize workflow and improve Testcontainers configuration #191
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: Run Tests | |
| on: | |
| push: | |
| branches: [ main, develop, test ] | |
| pull_request: | |
| branches: [ main, develop, test ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Check Docker availability | |
| run: | | |
| docker --version | |
| docker info | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Run memory-api tests with coverage | |
| run: ./gradlew :memory-api:test :memory-api:jacocoTestReport --info --stacktrace --continue --debug | |
| env: | |
| SPRING_PROFILES_ACTIVE: test | |
| # TestContainers GitHub Actions 최적화 설정 | |
| TESTCONTAINERS_RYUK_DISABLED: true | |
| TESTCONTAINERS_CHECKS_DISABLE: true | |
| TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX: "" | |
| DOCKER_BUILDKIT: 0 | |
| # 더 상세한 로깅 | |
| SPRING_LOGGING_LEVEL_ROOT: DEBUG | |
| SPRING_LOGGING_LEVEL_ORG_TESTCONTAINERS: DEBUG | |
| SPRING_LOGGING_LEVEL_COM_GITHUB_DOCKERJAVA: DEBUG | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./memory-api/build/reports/jacoco/test/jacocoTestReport.xml |