diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9c3f8b0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 25 + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + + - name: Set up Gradle (with build cache) + uses: gradle/actions/setup-gradle@v4 + + - name: Build + run all tests + run: ./gradlew --no-daemon build + + - name: Upload test reports on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: test-reports + path: | + **/build/reports/tests/ + **/build/test-results/ + retention-days: 7 diff --git a/README.md b/README.md index 00eb60b..c903cef 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # OpenRemit +[![CI](https://github.com/NewEgoDoc/OpenRemit/actions/workflows/ci.yml/badge.svg)](https://github.com/NewEgoDoc/OpenRemit/actions/workflows/ci.yml) + 송금 + 내부 결제 게이트웨이 백엔드. ## 실행 @@ -23,3 +25,12 @@ docker compose up -d ## 스택 Kotlin 2.2 / Spring Boot 4.0 / Java 21 · MySQL 8 + Flyway · Redis · Kafka · Resilience4j · Testcontainers + Kotest + +## 테스트 + +```bash +./gradlew build +``` + +통합 테스트는 Testcontainers로 MySQL 8 + Redis 7을 자동 기동합니다 (Docker 필요). +GitHub Actions CI에서도 동일한 Testcontainers 기반으로 매 커밋 검증.