From 1977d3cea52994df79a7c86c02fa401bd99314a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=84=EB=8F=99=ED=98=84?= Date: Thu, 26 Oct 2023 18:52:18 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95=20=20(#32)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 테스트 오류 수정 * feat: pull request마다 테스트 진행하는 기능 추가 --- .github/workflows/be-deploy.yml | 2 +- .github/workflows/pull-request-test.yml | 34 +++++++++++++++++++ .../controller/ApplicationControllerTest.java | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pull-request-test.yml diff --git a/.github/workflows/be-deploy.yml b/.github/workflows/be-deploy.yml index 62904e0..9b15f0e 100644 --- a/.github/workflows/be-deploy.yml +++ b/.github/workflows/be-deploy.yml @@ -1,4 +1,4 @@ -name: Upbrella DEV CI +name: Yonsei-Golf DEV CI on: push: diff --git a/.github/workflows/pull-request-test.yml b/.github/workflows/pull-request-test.yml new file mode 100644 index 0000000..dff11e3 --- /dev/null +++ b/.github/workflows/pull-request-test.yml @@ -0,0 +1,34 @@ +name: Yonsei-Golf DEV CI + +on: + pull_request: + branches: [ "main" ] + +env: + WORKING_DIRECTORY: ./ + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: checkout + uses: actions/checkout@v3 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'adopt' + + - name: Set application properties + run: | + touch src/main/resources/application.properties + echo "${{ secrets.APPLICATION_PROPERTIES }}" > src/main/resources/application.properties + + - name: Build with Gradle + run: | + chmod +x gradlew + ./gradlew clean build + env: + WORKING_DIRECTORY: ${{ env.WORKING_DIRECTORY }} diff --git a/src/test/java/yonseigolf/server/apply/controller/ApplicationControllerTest.java b/src/test/java/yonseigolf/server/apply/controller/ApplicationControllerTest.java index 0ff0104..dadb7bb 100644 --- a/src/test/java/yonseigolf/server/apply/controller/ApplicationControllerTest.java +++ b/src/test/java/yonseigolf/server/apply/controller/ApplicationControllerTest.java @@ -221,7 +221,7 @@ void getApplicationTest() throws Exception { given(applyService.getApplicationResults(any(), any(), any())).willReturn(mockPage); // when & then - mockMvc.perform(get("/admin/application") + mockMvc.perform(get("/admin/forms") .param("documentPass", "true") .param("finalPass", "false") .param("page", "0")