From 0038661b6a8b398ecaa63c3f075e1e7fe6e926d3 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 20:12:51 +0900 Subject: [PATCH 01/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yaml b/.github/workflows/pr_sync_ci.yaml index 609d153e..b230ff38 100644 --- a/.github/workflows/pr_sync_ci.yaml +++ b/.github/workflows/pr_sync_ci.yaml @@ -1,6 +1,6 @@ name: Spring Boot Gradle Test Workflow -on: [ pull_request ] +on: pull_request jobs: build: From 3fc9a618a68f9b7d619224c3e31fad477b1a38f7 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 20:16:17 +0900 Subject: [PATCH 02/42] =?UTF-8?q?fix:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_sync_ci.yaml b/.github/workflows/pr_sync_ci.yaml index b230ff38..db75433c 100644 --- a/.github/workflows/pr_sync_ci.yaml +++ b/.github/workflows/pr_sync_ci.yaml @@ -1,3 +1,4 @@ +--- name: Spring Boot Gradle Test Workflow on: pull_request From 2a51067728dfba7aa61506ff7cd0cb4b491f7f8e Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 20:19:09 +0900 Subject: [PATCH 03/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/{pr_sync_ci.yaml => pr_sync_ci.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{pr_sync_ci.yaml => pr_sync_ci.yml} (100%) diff --git a/.github/workflows/pr_sync_ci.yaml b/.github/workflows/pr_sync_ci.yml similarity index 100% rename from .github/workflows/pr_sync_ci.yaml rename to .github/workflows/pr_sync_ci.yml From 92e893349518f65c70398bfa640470e88d2770ea Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 20:40:44 +0900 Subject: [PATCH 04/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index db75433c..cc924b22 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -1,12 +1,9 @@ ---- name: Spring Boot Gradle Test Workflow - -on: pull_request - +on: + - pull_request jobs: build: runs-on: ubuntu-latest - steps: - name: Repository checkout uses: actions/checkout@v2 @@ -17,7 +14,9 @@ jobs: mysql database: ${{secrets.TEST_DATABASE}} mysql user: ${{secrets.TEST_DB_USERNAME}} mysql password: ${{secrets.TEST_DB_PASSWORD}} + # run 명령어로 schema 만드는 명령어 실행 + - name: Init Schema run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ../.././mysql/schema.sql # java 설치 From 5b7cfb4e23f27f88d0a195797839f4f1945816f9 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 20:43:33 +0900 Subject: [PATCH 05/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit schema directory 수정 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index cc924b22..4937e9d0 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -17,7 +17,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ../.././mysql/schema.sql + run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql # java 설치 - name: Set up JDK 17 From c29cff1445c94dcb7707e9e10b707a01297c5c6b Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 20:48:29 +0900 Subject: [PATCH 06/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mysql 연결 시 localhost 추가 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 4937e9d0..7a26d9e5 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -17,7 +17,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql + run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql # java 설치 - name: Set up JDK 17 From 9baaffa2849789e39193067aca193ac437c1fa92 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 20:59:17 +0900 Subject: [PATCH 07/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=206?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mysql 생성 시간 부여 후 init 작업 할 수 있게 step 위치 변경 --- .github/workflows/pr_sync_ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 7a26d9e5..90e226c6 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -1,6 +1,8 @@ name: Spring Boot Gradle Test Workflow on: - - pull_request + pull_request: + branches: + - master jobs: build: runs-on: ubuntu-latest @@ -15,10 +17,6 @@ jobs: mysql user: ${{secrets.TEST_DB_USERNAME}} mysql password: ${{secrets.TEST_DB_PASSWORD}} - # run 명령어로 schema 만드는 명령어 실행 - - name: Init Schema - run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql - # java 설치 - name: Set up JDK 17 uses: actions/setup-java@v4.0.0 @@ -26,6 +24,10 @@ jobs: java-version: '17' distribution: 'liberica' + # run 명령어로 schema 만드는 명령어 실행 + - name: Init Schema + run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql + # 환경 변수 적용 - name: Configure application.yaml under test directory uses: microsoft/variable-substitution@v1 From 11fcf4eb52ed64d007058aa3bbe59a7d5f88340e Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:02:50 +0900 Subject: [PATCH 08/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pull reque 시 작동하는 branch 변경 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 90e226c6..d1362dd4 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -2,7 +2,7 @@ name: Spring Boot Gradle Test Workflow on: pull_request: branches: - - master + - main jobs: build: runs-on: ubuntu-latest From 2b2f9ca7d9199e3daca886a073dc3f11e1aeb01f Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:11:44 +0900 Subject: [PATCH 09/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=208?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sql 접속과정에서 어디가 정확히 문제인지 알기 위해 실행 스크립트 분리 --- .github/workflows/pr_sync_ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index d1362dd4..c060bd6f 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -25,8 +25,12 @@ jobs: distribution: 'liberica' # run 명령어로 schema 만드는 명령어 실행 - - name: Init Schema - run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql + - name: Into Schema + run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} + + # init schema + - name: init schema + run: < ./mysql/schema.sql # 환경 변수 적용 - name: Configure application.yaml under test directory From b3910ba84d8b8f0cf36a55da1e09a43b0933ebfd Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:24:27 +0900 Subject: [PATCH 10/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=209?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ddl create 로 build와 test 되는지 점검 --- .github/workflows/pr_sync_ci.yml | 14 +++++++------- src/main/resources/application.yaml | 2 +- src/test/resources/application-test.yaml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index c060bd6f..d30084d6 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -24,13 +24,13 @@ jobs: java-version: '17' distribution: 'liberica' - # run 명령어로 schema 만드는 명령어 실행 - - name: Into Schema - run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} - - # init schema - - name: init schema - run: < ./mysql/schema.sql +# # run 명령어로 schema 만드는 명령어 실행 +# - name: Into Schema +# run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} +# +# # init schema +# - name: init schema +# run: < ./mysql/schema.sql # 환경 변수 적용 - name: Configure application.yaml under test directory diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 0e0e2a55..cf01672e 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -6,5 +6,5 @@ spring: url: jdbc:mysql://localhost:3306/ootw jpa: hibernate: - ddl-auto: validate + ddl-auto: create open-in-view: false diff --git a/src/test/resources/application-test.yaml b/src/test/resources/application-test.yaml index 0e0e2a55..cf01672e 100644 --- a/src/test/resources/application-test.yaml +++ b/src/test/resources/application-test.yaml @@ -6,5 +6,5 @@ spring: url: jdbc:mysql://localhost:3306/ootw jpa: hibernate: - ddl-auto: validate + ddl-auto: create open-in-view: false From 8ab165ace37ea05d356d0c286a82716186731e12 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:28:02 +0900 Subject: [PATCH 11/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit file 수정 후 재시도 --- .github/workflows/pr_sync_ci.yml | 14 +++++++------- src/main/resources/application.yaml | 2 +- src/test/resources/application-test.yaml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index d30084d6..7c8ac4f2 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -24,13 +24,13 @@ jobs: java-version: '17' distribution: 'liberica' -# # run 명령어로 schema 만드는 명령어 실행 -# - name: Into Schema -# run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} -# -# # init schema -# - name: init schema -# run: < ./mysql/schema.sql + # run 명령어로 schema 만드는 명령어 실행 + - name: Into Schema + run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} + + # init schema + - name: init schema + run: < ./mysql/schema.sql # 환경 변수 적용 - name: Configure application.yaml under test directory diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index cf01672e..0e0e2a55 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -6,5 +6,5 @@ spring: url: jdbc:mysql://localhost:3306/ootw jpa: hibernate: - ddl-auto: create + ddl-auto: validate open-in-view: false diff --git a/src/test/resources/application-test.yaml b/src/test/resources/application-test.yaml index cf01672e..0e0e2a55 100644 --- a/src/test/resources/application-test.yaml +++ b/src/test/resources/application-test.yaml @@ -6,5 +6,5 @@ spring: url: jdbc:mysql://localhost:3306/ootw jpa: hibernate: - ddl-auto: create + ddl-auto: validate open-in-view: false From e7fc15342043ef811096aa6f1efe148a01891527 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:29:42 +0900 Subject: [PATCH 12/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2011?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 포트 번호 추가 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 7c8ac4f2..e2e31771 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -26,7 +26,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Into Schema - run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} + run: mysql -h 127.0.0.1:3306 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} # init schema - name: init schema From 4241dd058799ba2e49cc208bfb816b661e263c78 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:31:55 +0900 Subject: [PATCH 13/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2012?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 인증 문제인지 재확인 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index e2e31771..66048c7b 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -26,7 +26,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Into Schema - run: mysql -h 127.0.0.1:3306 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} + run: mysql -h 127.0.0.1 -u root -p # init schema - name: init schema From 9b64a8fdc86e8b2d66069cac01da6072fd9eb46a Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:45:05 +0900 Subject: [PATCH 14/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2013?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 컨테이너 상태 확인 --- .github/workflows/pr_sync_ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 66048c7b..27567eec 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -17,6 +17,9 @@ jobs: mysql user: ${{secrets.TEST_DB_USERNAME}} mysql password: ${{secrets.TEST_DB_PASSWORD}} + - name: chekcking docker container + run: docker ps -al + # java 설치 - name: Set up JDK 17 uses: actions/setup-java@v4.0.0 From 48eb44585399ec6934a5c719d91feb955ed9d6e3 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:48:17 +0900 Subject: [PATCH 15/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2014?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 27567eec..55938e7a 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -17,9 +17,9 @@ jobs: mysql user: ${{secrets.TEST_DB_USERNAME}} mysql password: ${{secrets.TEST_DB_PASSWORD}} - - name: chekcking docker container - run: docker ps -al - + - name: go into docker container + run: docker exec -it sweet_hoover /bin/bash + # java 설치 - name: Set up JDK 17 uses: actions/setup-java@v4.0.0 @@ -28,12 +28,9 @@ jobs: distribution: 'liberica' # run 명령어로 schema 만드는 명령어 실행 - - name: Into Schema - run: mysql -h 127.0.0.1 -u root -p + - name: Init Schema + run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql - # init schema - - name: init schema - run: < ./mysql/schema.sql # 환경 변수 적용 - name: Configure application.yaml under test directory From a432ef41be640153d36d70ae3bee9b3d62de95b5 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 21:56:39 +0900 Subject: [PATCH 16/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2014?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker 접속 로직 추가 --- .github/workflows/pr_sync_ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 55938e7a..1492d587 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -17,8 +17,10 @@ jobs: mysql user: ${{secrets.TEST_DB_USERNAME}} mysql password: ${{secrets.TEST_DB_PASSWORD}} - - name: go into docker container - run: docker exec -it sweet_hoover /bin/bash + - name: Get Docker Container Name + run: | + CONTAINER_NAME=$(docker ps --format "{{.Names}}" | grep 'mysql') + echo "CONTAINER_NAME=$CONTAINER_NAME" >> $GITHUB_ENV # java 설치 - name: Set up JDK 17 @@ -27,6 +29,9 @@ jobs: java-version: '17' distribution: 'liberica' + - name: go into docker container + run: docker exec -it $CONTAINER_NAME /bin/bash + # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql From 903bccb8170588d8ce7f4865b6c51be23bf69518 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:33:15 +0900 Subject: [PATCH 17/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2015?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker 를 사용하지 않은 순수 sql 로 구동 --- .github/workflows/pr_sync_ci.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 1492d587..ea53ce88 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -10,17 +10,13 @@ jobs: - name: Repository checkout uses: actions/checkout@v2 - - name: Setup MySQL + - name: Set up MySQL uses: mirromutth/mysql-action@v1.1 with: mysql database: ${{secrets.TEST_DATABASE}} mysql user: ${{secrets.TEST_DB_USERNAME}} mysql password: ${{secrets.TEST_DB_PASSWORD}} - - name: Get Docker Container Name - run: | - CONTAINER_NAME=$(docker ps --format "{{.Names}}" | grep 'mysql') - echo "CONTAINER_NAME=$CONTAINER_NAME" >> $GITHUB_ENV # java 설치 - name: Set up JDK 17 @@ -29,9 +25,6 @@ jobs: java-version: '17' distribution: 'liberica' - - name: go into docker container - run: docker exec -it $CONTAINER_NAME /bin/bash - # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql From 52deb399fb66bf9b7c80a2dbad586f36fa7b11de Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:35:03 +0900 Subject: [PATCH 18/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2016?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 접속 host 추가 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index ea53ce88..bba9b01e 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -27,7 +27,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql + run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql # 환경 변수 적용 From cf994b93ddea2a23575e09200b8d1c127d77c777 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:37:40 +0900 Subject: [PATCH 19/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2017?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 포트 번호 추가 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index bba9b01e..611c0e69 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -27,7 +27,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql + run: mysql -h 127.0.0.1 -p 3306 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql # 환경 변수 적용 From 3c7eaec8f2202c4d6d4e1f46ce765869afd96427 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:44:22 +0900 Subject: [PATCH 20/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2018?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 611c0e69..315d624f 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -10,10 +10,9 @@ jobs: - name: Repository checkout uses: actions/checkout@v2 - - name: Set up MySQL - uses: mirromutth/mysql-action@v1.1 + - uses: shogo82148/actions-setup-mysql@v1 with: - mysql database: ${{secrets.TEST_DATABASE}} + mysql-version: "8.0" mysql user: ${{secrets.TEST_DB_USERNAME}} mysql password: ${{secrets.TEST_DB_PASSWORD}} From 5aab5b3c44d494add7b75461479b5d6095557567 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:45:29 +0900 Subject: [PATCH 21/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2019?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 315d624f..0d7a9407 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -13,8 +13,8 @@ jobs: - uses: shogo82148/actions-setup-mysql@v1 with: mysql-version: "8.0" - mysql user: ${{secrets.TEST_DB_USERNAME}} - mysql password: ${{secrets.TEST_DB_PASSWORD}} + user: ${{secrets.TEST_DB_USERNAME}} + password: ${{secrets.TEST_DB_PASSWORD}} # java 설치 From 4709ff96a333c8a3c83e6179b14aba96ba9d78fc Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:46:45 +0900 Subject: [PATCH 22/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2020?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 포트 및 host 삭제 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 0d7a9407..65ce2d0f 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -26,7 +26,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -h 127.0.0.1 -p 3306 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql + run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql # 환경 변수 적용 From e579240b0183ea8b12225e78151140409e49d04f Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:48:35 +0900 Subject: [PATCH 23/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2021?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 65ce2d0f..c108718e 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -26,7 +26,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} < ./mysql/schema.sql + run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} # 환경 변수 적용 From dad01c06334943b56a80413ba805864643eacb88 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:49:44 +0900 Subject: [PATCH 24/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index c108718e..93ece2bf 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -13,7 +13,6 @@ jobs: - uses: shogo82148/actions-setup-mysql@v1 with: mysql-version: "8.0" - user: ${{secrets.TEST_DB_USERNAME}} password: ${{secrets.TEST_DB_PASSWORD}} @@ -26,7 +25,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} + run: mysql -u root -p=${{secrets.TEST_DB_PASSWORD}} # 환경 변수 적용 From 45a9ecb0a1f0ab48d7097d073c0437197aa7d58d Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:51:17 +0900 Subject: [PATCH 25/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2023?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mysql 계정 수정 --- .github/workflows/pr_sync_ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 93ece2bf..955e0309 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -13,6 +13,7 @@ jobs: - uses: shogo82148/actions-setup-mysql@v1 with: mysql-version: "8.0" + user: ${{secrets.TEST_DB_USERNAME}} password: ${{secrets.TEST_DB_PASSWORD}} @@ -25,7 +26,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -u root -p=${{secrets.TEST_DB_PASSWORD}} + run: sudo mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} # 환경 변수 적용 From 3b166ea088b367a0e46cf84c00e3fcefcae86ed0 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:53:02 +0900 Subject: [PATCH 26/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2024?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 955e0309..0aae5e76 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -13,8 +13,7 @@ jobs: - uses: shogo82148/actions-setup-mysql@v1 with: mysql-version: "8.0" - user: ${{secrets.TEST_DB_USERNAME}} - password: ${{secrets.TEST_DB_PASSWORD}} + root-password: ${{secrets.TEST_DB_PASSWORD}} # java 설치 @@ -26,7 +25,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: sudo mysql -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} + run: mysql -u root -p=${{secrets.TEST_DB_PASSWORD}} # 환경 변수 적용 From 5937751806d9e0b77421ee49869b6dfa6f13f670 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Thu, 21 Dec 2023 22:55:53 +0900 Subject: [PATCH 27/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2025?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 0aae5e76..230498d0 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -25,7 +25,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -u root -p=${{secrets.TEST_DB_PASSWORD}} + run: mysql -u root -p # 환경 변수 적용 From 63706c0b11b2ef264863b58cb0309dbe7ad4582b Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:12:43 +0900 Subject: [PATCH 28/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2026?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 16 ++++++++-------- build.gradle | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 230498d0..ba25b4a8 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -10,11 +10,12 @@ jobs: - name: Repository checkout uses: actions/checkout@v2 - - uses: shogo82148/actions-setup-mysql@v1 + - name: Set up MySQL + uses: mirromutth/mysql-action@v1.1 with: - mysql-version: "8.0" - root-password: ${{secrets.TEST_DB_PASSWORD}} - + mysql database: ${{secrets.TEST_DATABASE}} + mysql user: ${{secrets.TEST_DB_USERNAME}} + mysql password: ${{secrets.TEST_DB_PASSWORD}} # java 설치 - name: Set up JDK 17 @@ -25,10 +26,9 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -u root -p - - - # 환경 변수 적용 + run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} + + # 환경 변수 적용 - name: Configure application.yaml under test directory uses: microsoft/variable-substitution@v1 with: diff --git a/build.gradle b/build.gradle index 5d9d90df..a4435b7b 100644 --- a/build.gradle +++ b/build.gradle @@ -31,6 +31,10 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' + + // Flyway + implementation 'org.flywaydb:flyway-core' + implementation 'org.flywaydb:flyway-mysql' } jacoco { From c8c09534771a05dd45dcf07759140203b0fddc4d Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:19:27 +0900 Subject: [PATCH 29/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2027?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mysql 접속 명령어 수정 --- .github/workflows/pr_sync_ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index ba25b4a8..993e1a8b 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -26,8 +26,8 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -h 127.0.0.1 -u ${{secrets.TEST_DB_USERNAME}} -p=${{secrets.TEST_DB_PASSWORD}} - + run: mysql -h 127.0.0.1 -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} + # 환경 변수 적용 - name: Configure application.yaml under test directory uses: microsoft/variable-substitution@v1 From 3b8f51f506bf7d79da0d642bab86653f321ce6f7 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:22:59 +0900 Subject: [PATCH 30/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2028?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mysql 컨테이너 대기 시간 고려 step 순서 변경 --- .github/workflows/pr_sync_ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 993e1a8b..99a5ab7b 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -24,10 +24,6 @@ jobs: java-version: '17' distribution: 'liberica' - # run 명령어로 schema 만드는 명령어 실행 - - name: Init Schema - run: mysql -h 127.0.0.1 -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} - # 환경 변수 적용 - name: Configure application.yaml under test directory uses: microsoft/variable-substitution@v1 @@ -42,6 +38,10 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew + # run 명령어로 schema 만드는 명령어 실행 + - name: Init Schema + run: mysql -h 127.0.0.1 -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} + # 프로젝트 빌드 - name: Build with Gradle run: ./gradlew clean build From 77ddafb6362ac6fd933f1e9d6b5e2997ee0cc4e2 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:24:37 +0900 Subject: [PATCH 31/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2029?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mysql 접속 host 변경 --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 99a5ab7b..be5b3af9 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -40,7 +40,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -h 127.0.0.1 -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} + run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} # 프로젝트 빌드 - name: Build with Gradle From d96f4e990ac4d0748de3905c23225fcaa9a91bca Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:29:37 +0900 Subject: [PATCH 32/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2030?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mysql 접속 권한 추가 --- .github/workflows/pr_sync_ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index be5b3af9..ec108d6d 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -24,7 +24,7 @@ jobs: java-version: '17' distribution: 'liberica' - # 환경 변수 적용 + # 환경 변수 적용 - name: Configure application.yaml under test directory uses: microsoft/variable-substitution@v1 with: @@ -38,6 +38,10 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew + # gradle 권한 추가 + - name: Grant execute permission for mysql + run: chmod 777 /var/run/mysqld/ + # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} From 7c0058ee1f2cbbce565c004602457529c716f0fc Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:30:52 +0900 Subject: [PATCH 33/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2031?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index ec108d6d..01924011 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -40,7 +40,7 @@ jobs: # gradle 권한 추가 - name: Grant execute permission for mysql - run: chmod 777 /var/run/mysqld/ + run: chmod 777 /var/run/mysqld # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema From d4bfeec51733b06f7ddbc65c0edac385b0fca5ef Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:33:03 +0900 Subject: [PATCH 34/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2032?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 6 ++-- .github/workflows/pr_sync_ci2.yml | 55 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pr_sync_ci2.yml diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 01924011..dea271c0 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -38,9 +38,9 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - # gradle 권한 추가 - - name: Grant execute permission for mysql - run: chmod 777 /var/run/mysqld +# # gradle 권한 추가 +# - name: Grant execute permission for mysql +# run: chmod 777 /var/run/mysqld # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema diff --git a/.github/workflows/pr_sync_ci2.yml b/.github/workflows/pr_sync_ci2.yml new file mode 100644 index 00000000..41196eae --- /dev/null +++ b/.github/workflows/pr_sync_ci2.yml @@ -0,0 +1,55 @@ +name: Spring Boot Gradle Test Workflow +on: + pull_request: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Repository checkout + uses: actions/checkout@v2 + + - name: Set up MySQL + uses: mirromutth/mysql-action@v1.1 + with: + mysql database: ${{secrets.TEST_DATABASE}} + mysql user: ${{secrets.TEST_DB_USERNAME}} + mysql password: ${{secrets.TEST_DB_PASSWORD}} + + # java 설치 + - name: Set up JDK 17 + uses: actions/setup-java@v4.0.0 + with: + java-version: '17' + distribution: 'liberica' + + # 환경 변수 적용 + - name: Configure application.yaml under test directory + uses: microsoft/variable-substitution@v1 + with: + files: ./src/main/resources/application.yaml + env: + spring.datasource.url: jdbc:mysql://localhost:3306/${{ secrets.TEST_DATABASE }} + spring.datasource.username: ${{ secrets.TEST_DB_USERNAME }} + spring.datasource.password: ${{ secrets.TEST_DB_PASSWORD }} + + # gradle 권한 추가 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + # gradle 권한 추가 + - name: Grant execute permission for mysql + run: chmod +x mysql + + # run 명령어로 schema 만드는 명령어 실행 + - name: Init Schema + run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} + + # 프로젝트 빌드 + - name: Build with Gradle + run: ./gradlew clean build + + # 테스트 실행 + - name: Run Tests + run: ./gradlew test From c21e08e79da0f71d35638b551763ae73d290ff23 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:36:32 +0900 Subject: [PATCH 35/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2033?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci2.yml b/.github/workflows/pr_sync_ci2.yml index 41196eae..0107b854 100644 --- a/.github/workflows/pr_sync_ci2.yml +++ b/.github/workflows/pr_sync_ci2.yml @@ -40,7 +40,7 @@ jobs: # gradle 권한 추가 - name: Grant execute permission for mysql - run: chmod +x mysql + run: chmod -R 755 /var/lib/mysql/ # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema From 287f7022d63877cd8b53527ac8e0c81af99f43c4 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:37:43 +0900 Subject: [PATCH 36/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2034?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci2.yml b/.github/workflows/pr_sync_ci2.yml index 0107b854..04113c08 100644 --- a/.github/workflows/pr_sync_ci2.yml +++ b/.github/workflows/pr_sync_ci2.yml @@ -40,7 +40,7 @@ jobs: # gradle 권한 추가 - name: Grant execute permission for mysql - run: chmod -R 755 /var/lib/mysql/ + run: sudo chmod -R 755 /var/lib/mysql/ # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema From ba3ede13dad76a302a4aec4227a3b483417a2507 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:40:39 +0900 Subject: [PATCH 37/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2035?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit protocoal 정보 추가 --- .github/workflows/pr_sync_ci2.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_sync_ci2.yml b/.github/workflows/pr_sync_ci2.yml index 04113c08..5b348b5d 100644 --- a/.github/workflows/pr_sync_ci2.yml +++ b/.github/workflows/pr_sync_ci2.yml @@ -44,7 +44,8 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Init Schema - run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} + run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp + # 프로젝트 빌드 - name: Build with Gradle From 191050e9b03c985a1dea9422334afdba4300c99e Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:42:52 +0900 Subject: [PATCH 38/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2036?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci2.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_sync_ci2.yml b/.github/workflows/pr_sync_ci2.yml index 5b348b5d..db2ac491 100644 --- a/.github/workflows/pr_sync_ci2.yml +++ b/.github/workflows/pr_sync_ci2.yml @@ -11,11 +11,12 @@ jobs: uses: actions/checkout@v2 - name: Set up MySQL - uses: mirromutth/mysql-action@v1.1 + uses: shogo82148/actions-setup-mysql@v1 with: - mysql database: ${{secrets.TEST_DATABASE}} - mysql user: ${{secrets.TEST_DB_USERNAME}} - mysql password: ${{secrets.TEST_DB_PASSWORD}} + mysql-version: "8.0" + root-password: ${{secrets.TEST_DB_PASSWORD}} + user: ${{secrets.TEST_DB_USERNAME}} + password: ${{secrets.TEST_DB_PASSWORD}} # java 설치 - name: Set up JDK 17 From a05759a1be2195e74789b482a72fb28c4ea952f2 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:48:26 +0900 Subject: [PATCH 39/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2037?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 20 ++++++----- .github/workflows/pr_sync_ci2.yml | 57 ------------------------------- 2 files changed, 12 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/pr_sync_ci2.yml diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index dea271c0..2618f775 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -11,11 +11,12 @@ jobs: uses: actions/checkout@v2 - name: Set up MySQL - uses: mirromutth/mysql-action@v1.1 + uses: shogo82148/actions-setup-mysql@v1 with: - mysql database: ${{secrets.TEST_DATABASE}} - mysql user: ${{secrets.TEST_DB_USERNAME}} - mysql password: ${{secrets.TEST_DB_PASSWORD}} + mysql-version: "8.0" + root-password: ${{secrets.TEST_DB_PASSWORD}} + user: ${{secrets.TEST_DB_USERNAME}} + password: ${{secrets.TEST_DB_PASSWORD}} # java 설치 - name: Set up JDK 17 @@ -38,13 +39,16 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew -# # gradle 권한 추가 -# - name: Grant execute permission for mysql -# run: chmod 777 /var/run/mysqld + # gradle 권한 추가 + - name: Grant execute permission for mysql + run: sudo chmod -R 755 /var/lib/mysql/ # run 명령어로 schema 만드는 명령어 실행 + - name: Into Schema + run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp + - name: Init Schema - run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} + run: source ./mysql/schema.sql # 프로젝트 빌드 - name: Build with Gradle diff --git a/.github/workflows/pr_sync_ci2.yml b/.github/workflows/pr_sync_ci2.yml deleted file mode 100644 index db2ac491..00000000 --- a/.github/workflows/pr_sync_ci2.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Spring Boot Gradle Test Workflow -on: - pull_request: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Repository checkout - uses: actions/checkout@v2 - - - name: Set up MySQL - uses: shogo82148/actions-setup-mysql@v1 - with: - mysql-version: "8.0" - root-password: ${{secrets.TEST_DB_PASSWORD}} - user: ${{secrets.TEST_DB_USERNAME}} - password: ${{secrets.TEST_DB_PASSWORD}} - - # java 설치 - - name: Set up JDK 17 - uses: actions/setup-java@v4.0.0 - with: - java-version: '17' - distribution: 'liberica' - - # 환경 변수 적용 - - name: Configure application.yaml under test directory - uses: microsoft/variable-substitution@v1 - with: - files: ./src/main/resources/application.yaml - env: - spring.datasource.url: jdbc:mysql://localhost:3306/${{ secrets.TEST_DATABASE }} - spring.datasource.username: ${{ secrets.TEST_DB_USERNAME }} - spring.datasource.password: ${{ secrets.TEST_DB_PASSWORD }} - - # gradle 권한 추가 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - # gradle 권한 추가 - - name: Grant execute permission for mysql - run: sudo chmod -R 755 /var/lib/mysql/ - - # run 명령어로 schema 만드는 명령어 실행 - - name: Init Schema - run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp - - - # 프로젝트 빌드 - - name: Build with Gradle - run: ./gradlew clean build - - # 테스트 실행 - - name: Run Tests - run: ./gradlew test From 49e0ba97d217d4a64e14ad6326a3cfcd1affa95b Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:50:37 +0900 Subject: [PATCH 40/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2038?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index 2618f775..c43c7117 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -45,10 +45,7 @@ jobs: # run 명령어로 schema 만드는 명령어 실행 - name: Into Schema - run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp - - - name: Init Schema - run: source ./mysql/schema.sql + run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp < ./mysql/schema.sql # 프로젝트 빌드 - name: Build with Gradle From dadb92b6094110dff02f232aa8721a0d9ad30492 Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:53:13 +0900 Subject: [PATCH 41/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2039?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.gradle b/build.gradle index a4435b7b..5d9d90df 100644 --- a/build.gradle +++ b/build.gradle @@ -31,10 +31,6 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' - - // Flyway - implementation 'org.flywaydb:flyway-core' - implementation 'org.flywaydb:flyway-mysql' } jacoco { From eba7dce1255476ba7aa85f6eff797ffc27b14cba Mon Sep 17 00:00:00 2001 From: shoeone96 Date: Fri, 22 Dec 2023 00:55:35 +0900 Subject: [PATCH 42/42] =?UTF-8?q?fix:=20ci=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=2040?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_sync_ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/pr_sync_ci.yml b/.github/workflows/pr_sync_ci.yml index c43c7117..e5270d3f 100644 --- a/.github/workflows/pr_sync_ci.yml +++ b/.github/workflows/pr_sync_ci.yml @@ -39,10 +39,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - # gradle 권한 추가 - - name: Grant execute permission for mysql - run: sudo chmod -R 755 /var/lib/mysql/ - # run 명령어로 schema 만드는 명령어 실행 - name: Into Schema run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp < ./mysql/schema.sql @@ -50,7 +46,3 @@ jobs: # 프로젝트 빌드 - name: Build with Gradle run: ./gradlew clean build - - # 테스트 실행 - - name: Run Tests - run: ./gradlew test