diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 73077c5..2806e0d 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -18,10 +18,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # ENV 로드, Github ENV 등록 - - name: Load ENV into Environment Variable - run: echo "${{ secrets.ENV }}" >> $GITHUB_ENV - # JDK 17 세팅 - name: Set up JDK 17 uses: actions/setup-java@v4 @@ -29,10 +25,15 @@ jobs: java-version: '17' distribution: 'temurin' - # Gradlew 생행 권한 허용 + # Gradlew 실행 권한 허용 - name: Grant Execute Permission for Gradlew run: chmod +x ./gradlew + # .env 파일 생성 + - name: Load secrets into .env file + run: | + echo "${{ secrets.ENV }}" >> .env + # Gradle 빌드 - name: Build with Gradle id: gradle diff --git a/.github/workflows/develop_pull_request.yml b/.github/workflows/develop_pull_request.yml index 577d77d..3085223 100644 --- a/.github/workflows/develop_pull_request.yml +++ b/.github/workflows/develop_pull_request.yml @@ -13,10 +13,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # ENV 설정 - - name: Load ENV into Environment Variable - run: echo "${{ secrets.ENV }}" >> $GITHUB_ENV - # JDK 17 세팅 - name: Set up JDK 17 uses: actions/setup-java@v4 @@ -24,10 +20,15 @@ jobs: java-version: '17' distribution: 'temurin' - # Gradlew 생행 권한 허용 + # Gradlew 실행 권한 허용 - name: Grant Execute Permission for Gradlew run: chmod +x ./gradlew + # .env 파일 생성 + - name: Load secrets into .env file + run: | + echo "${{ secrets.ENV }}" >> .env + # Gradle setup, check(코드 품질 관리, 테스트) 실행 - name: Setup Gradle uses: gradle/gradle-build-action@v2 diff --git a/src/test/java/com/ftm/server/ServerApplicationTests.java b/src/test/java/com/ftm/server/ServerApplicationTests.java index 9634091..5b67a07 100644 --- a/src/test/java/com/ftm/server/ServerApplicationTests.java +++ b/src/test/java/com/ftm/server/ServerApplicationTests.java @@ -2,8 +2,10 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.TestPropertySource; @SpringBootTest +@TestPropertySource(locations = "file:.env") class ServerApplicationTests { @Test