diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..823f254 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,3 @@ +- 코드 리뷰 코멘트는 항상 한국어로 작성한다. +- 변경사항별로: (1) 문제점 (2) 영향 (3) 수정 제안 순서로 작성한다. +- 보안/성능/동시성 이슈를 우선 점검한다. \ No newline at end of file diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cd.yml similarity index 88% rename from .github/workflows/cicd.yaml rename to .github/workflows/cd.yml index 13e0335..6ce4595 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: pinit-auth CI/CD +name: pinit-auth CD on: push: @@ -10,7 +10,7 @@ permissions: jobs: build-test-push-deploy: - runs-on: [ arc-runner-set ] # ARC 러너 라벨에 맞게 조정 + runs-on: [ arc-runner-set ] env: IMAGE_REPO: ghcr.io/pinit-scheduler/pinit-auth/app @@ -27,7 +27,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: "21" # 사용 버전에 맞게 조정 + java-version: "21" cache: gradle - name: Build & Test @@ -55,7 +55,7 @@ jobs: - name: Install kubectl (if needed) uses: azure/setup-kubectl@v4 with: - version: v1.33.6 # 클러스터 버전에 맞게 조정 + version: v1.33.6 - name: Create kubeconfig from in-cluster ServiceAccount shell: bash @@ -89,7 +89,6 @@ jobs: - name: Deploy (apply manifest with GITHUB_SHA substitution) shell: bash run: | - # envsubst가 없으면 설치 필요(러너 이미지에 포함시키는 방식을 권장) command -v envsubst >/dev/null 2>&1 || (echo "envsubst not found" && exit 1) export GITHUB_SHA="${{ github.sha }}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a5336f9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: pinit-auth CI + +on: + pull_request: + +permissions: + contents: read + +jobs: + build-test: + runs-on: [ arc-runner-set ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "21" + cache: gradle + + - name: Build & Test + run: ./gradlew clean test build diff --git a/src/test/java/me/gg/pinit/PinitAuthApplicationTests.java b/src/test/java/me/gg/pinit/PinitAuthApplicationTests.java index 2d7eb39..1f45ee8 100644 --- a/src/test/java/me/gg/pinit/PinitAuthApplicationTests.java +++ b/src/test/java/me/gg/pinit/PinitAuthApplicationTests.java @@ -1,13 +1,20 @@ package me.gg.pinit; +import me.gg.pinit.infrastructure.jwt.JwtTokenProvider; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.bean.override.mockito.MockitoBean; +@ActiveProfiles("test") @SpringBootTest class PinitAuthApplicationTests { + @MockitoBean + JwtTokenProvider jwtTokenProvider; + + @Test void contextLoads() { } - } diff --git a/src/test/resources/application.yml b/src/test/resources/application-test.yml similarity index 100% rename from src/test/resources/application.yml rename to src/test/resources/application-test.yml