From 652db6e29fa0009bec06c6decedb1c705f879345 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 11:46:28 +0900 Subject: [PATCH 01/12] =?UTF-8?q?feat:=20workflows=20yml=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 0 .idea/.gitignore | 8 ++++++ .idea/ISP.iml | 12 ++++++++ .idea/jpa-buddy.xml | 6 ++++ .idea/misc.xml | 9 ++++++ .idea/modules.xml | 8 ++++++ .idea/sonarlint/issuestore/index.pb | 0 .idea/sonarlint/securityhotspotstore/index.pb | 0 .idea/vcs.xml | 6 ++++ backend/.github/workflows/deploy.yml | 28 +++++++++++++++++++ 10 files changed, 77 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/ISP.iml create mode 100644 .idea/jpa-buddy.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/sonarlint/issuestore/index.pb create mode 100644 .idea/sonarlint/securityhotspotstore/index.pb create mode 100644 .idea/vcs.xml create mode 100644 backend/.github/workflows/deploy.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/ISP.iml b/.idea/ISP.iml new file mode 100644 index 00000000..c401be94 --- /dev/null +++ b/.idea/ISP.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jpa-buddy.xml b/.idea/jpa-buddy.xml new file mode 100644 index 00000000..966d5f56 --- /dev/null +++ b/.idea/jpa-buddy.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..d79bd4e1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..1900631b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/index.pb b/.idea/sonarlint/securityhotspotstore/index.pb new file mode 100644 index 00000000..e69de29b diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/backend/.github/workflows/deploy.yml b/backend/.github/workflows/deploy.yml new file mode 100644 index 00000000..460883e4 --- /dev/null +++ b/backend/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: how-about-trip-webservice + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + shell: bash + + - name: Build with Gradle + run: ./gradlew clean build + shell: bash \ No newline at end of file From 9f23cbe19233e84a4ea193555b3c00c7a5e53a31 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 11:46:58 +0900 Subject: [PATCH 02/12] =?UTF-8?q?feat:=20workflows=20yml=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 0 .idea/.gitignore | 8 ++++++ .idea/ISP.iml | 12 ++++++++ .idea/jpa-buddy.xml | 6 ++++ .idea/misc.xml | 9 ++++++ .idea/modules.xml | 8 ++++++ .idea/sonarlint/issuestore/index.pb | 0 .idea/sonarlint/securityhotspotstore/index.pb | 0 .idea/vcs.xml | 6 ++++ backend/.github/workflows/deploy.yml | 28 +++++++++++++++++++ 10 files changed, 77 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/ISP.iml create mode 100644 .idea/jpa-buddy.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/sonarlint/issuestore/index.pb create mode 100644 .idea/sonarlint/securityhotspotstore/index.pb create mode 100644 .idea/vcs.xml create mode 100644 backend/.github/workflows/deploy.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/ISP.iml b/.idea/ISP.iml new file mode 100644 index 00000000..c401be94 --- /dev/null +++ b/.idea/ISP.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jpa-buddy.xml b/.idea/jpa-buddy.xml new file mode 100644 index 00000000..966d5f56 --- /dev/null +++ b/.idea/jpa-buddy.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..d79bd4e1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..1900631b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb new file mode 100644 index 00000000..e69de29b diff --git a/.idea/sonarlint/securityhotspotstore/index.pb b/.idea/sonarlint/securityhotspotstore/index.pb new file mode 100644 index 00000000..e69de29b diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/backend/.github/workflows/deploy.yml b/backend/.github/workflows/deploy.yml new file mode 100644 index 00000000..460883e4 --- /dev/null +++ b/backend/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: how-about-trip-webservice + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + shell: bash + + - name: Build with Gradle + run: ./gradlew clean build + shell: bash \ No newline at end of file From 0b472e9f78f591620d3aa1eafba88f3c2a6772c8 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 11:50:13 +0900 Subject: [PATCH 03/12] =?UTF-8?q?fix:=20yml=20=EC=9C=84=EC=B9=98=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {backend/.github => .github}/workflows/deploy.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {backend/.github => .github}/workflows/deploy.yml (100%) diff --git a/backend/.github/workflows/deploy.yml b/.github/workflows/deploy.yml similarity index 100% rename from backend/.github/workflows/deploy.yml rename to .github/workflows/deploy.yml From dd1bc6bb1b48cef96feb81e9fcafd186539d8a46 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 11:52:41 +0900 Subject: [PATCH 04/12] =?UTF-8?q?fix:=20yml=20gradlew=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 460883e4..d0263135 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,7 +20,7 @@ jobs: java-version: 17 - name: Grant execute permission for gradlew - run: chmod +x ./gradlew + run: chmod +x backend/gradlew shell: bash - name: Build with Gradle From 381c444b21d8d1d1b35f3d0de3b67045e1807abf Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 11:53:44 +0900 Subject: [PATCH 05/12] =?UTF-8?q?fix:=20yml=20gradlew=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d0263135..c4731ba3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,5 +24,5 @@ jobs: shell: bash - name: Build with Gradle - run: ./gradlew clean build + run: backend/gradlew clean build shell: bash \ No newline at end of file From b50b92f9b5e727219ee27cc87ba94553c0910897 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 13:28:58 +0900 Subject: [PATCH 06/12] =?UTF-8?q?#3=20fix:=20working-directory=20=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c4731ba3..6f6492ac 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,6 +6,11 @@ on: - master workflow_dispatch: +defaults: + run: + shell: bash + working-directory: ./backend + jobs: build: runs-on: ubuntu-latest From 6dde38ddf6b829eb7e44d280aa9e2d3455ddea3e Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 13:31:43 +0900 Subject: [PATCH 07/12] =?UTF-8?q?#3=20fix:=20run=20=EA=B2=BD=EB=A1=9C=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/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6f6492ac..facf8267 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,9 +25,9 @@ jobs: java-version: 17 - name: Grant execute permission for gradlew - run: chmod +x backend/gradlew + run: chmod +x ./gradlew shell: bash - name: Build with Gradle - run: backend/gradlew clean build + run: ./gradlew clean build shell: bash \ No newline at end of file From cac02c16b9fef2abcf08c4a1f8a7c3e27c0e1e61 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 14:02:41 +0900 Subject: [PATCH 08/12] =?UTF-8?q?feat:=20=EC=B4=88=EA=B8=B0=ED=99=94=20?= =?UTF-8?q?=EB=A9=A4=EB=B2=84=20=EB=B3=80=EC=88=98=20@Builder.Default=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/isp/backend/domain/schedules/entity/MySchedules.java | 2 ++ .../main/java/com/isp/backend/domain/users/entity/Users.java | 1 + 2 files changed, 3 insertions(+) diff --git a/backend/src/main/java/com/isp/backend/domain/schedules/entity/MySchedules.java b/backend/src/main/java/com/isp/backend/domain/schedules/entity/MySchedules.java index 733f4394..f91a2687 100644 --- a/backend/src/main/java/com/isp/backend/domain/schedules/entity/MySchedules.java +++ b/backend/src/main/java/com/isp/backend/domain/schedules/entity/MySchedules.java @@ -29,6 +29,7 @@ public class MySchedules extends BaseEntity { @JoinColumn(name = "user_id", nullable = false) private Users users; + @Builder.Default @OneToMany(mappedBy = "mySchedules", cascade = CascadeType.ALL, orphanRemoval = true) private List travelPlaces = new ArrayList<>(); @@ -45,6 +46,7 @@ public class MySchedules extends BaseEntity { @Column(name = "total_price") private double totalPrice ; + @Builder.Default @Column(name = "activated", nullable = false) private boolean activated = true; } diff --git a/backend/src/main/java/com/isp/backend/domain/users/entity/Users.java b/backend/src/main/java/com/isp/backend/domain/users/entity/Users.java index 9223f757..2176dedb 100644 --- a/backend/src/main/java/com/isp/backend/domain/users/entity/Users.java +++ b/backend/src/main/java/com/isp/backend/domain/users/entity/Users.java @@ -35,6 +35,7 @@ public class Users extends BaseEntity { @Column(name = "login_type") private String loginType ; + @Builder.Default @Column(name = "activated", nullable = false) private boolean activated = true; } From 06d1b436359fc63b7bcd8bd553f4fe7d559f2e67 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 14:07:13 +0900 Subject: [PATCH 09/12] =?UTF-8?q?#3=20fix:=20BackendApplicationTests=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/ISP.iml | 2 +- .idea/compiler.xml | 14 +++++++++++++ .idea/gradle.xml | 17 ++++++++++++++++ .idea/jarRepositories.xml | 20 +++++++++++++++++++ .idea/jpa-buddy.xml | 1 + .idea/misc.xml | 6 +++++- .idea/modules/backend.iml | 6 ++++++ .idea/modules/backend.main.iml | 6 ++++++ .idea/modules/backend.test.iml | 6 ++++++ .../isp/backend/BackendApplicationTests.java | 7 ++++++- 10 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 .idea/compiler.xml create mode 100644 .idea/gradle.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/modules/backend.iml create mode 100644 .idea/modules/backend.main.iml create mode 100644 .idea/modules/backend.test.iml diff --git a/.idea/ISP.iml b/.idea/ISP.iml index c401be94..55a758cf 100644 --- a/.idea/ISP.iml +++ b/.idea/ISP.iml @@ -1,6 +1,6 @@ - + diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 00000000..6b7d6740 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 00000000..539de5de --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 00000000..fdc392fe --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jpa-buddy.xml b/.idea/jpa-buddy.xml index 966d5f56..898e07a6 100644 --- a/.idea/jpa-buddy.xml +++ b/.idea/jpa-buddy.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index d79bd4e1..0a92af50 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/.idea/modules/backend.iml b/.idea/modules/backend.iml new file mode 100644 index 00000000..1bd5cb3e --- /dev/null +++ b/.idea/modules/backend.iml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules/backend.main.iml b/.idea/modules/backend.main.iml new file mode 100644 index 00000000..6bd375ab --- /dev/null +++ b/.idea/modules/backend.main.iml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules/backend.test.iml b/.idea/modules/backend.test.iml new file mode 100644 index 00000000..10c8c277 --- /dev/null +++ b/.idea/modules/backend.test.iml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/backend/src/test/java/com/isp/backend/BackendApplicationTests.java b/backend/src/test/java/com/isp/backend/BackendApplicationTests.java index 69b8afa7..90052bed 100644 --- a/backend/src/test/java/com/isp/backend/BackendApplicationTests.java +++ b/backend/src/test/java/com/isp/backend/BackendApplicationTests.java @@ -1,13 +1,18 @@ package com.isp.backend; import org.junit.jupiter.api.Test; +import org.springframework.boot.SpringApplication; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.ApplicationContext; + +import static org.junit.jupiter.api.Assertions.assertNotNull; @SpringBootTest class BackendApplicationTests { @Test void contextLoads() { + ApplicationContext context = SpringApplication.run(BackendApplication.class); + assertNotNull(context); } - } From 93d50e982182bb035931b8f77c1e7ad8fc609d49 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 14:27:41 +0900 Subject: [PATCH 10/12] =?UTF-8?q?fix:=20yml=20database=20=EC=97=B0?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index facf8267..361ce3a1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,14 @@ jobs: with: java-version: 17 + - name: Set up MySQL + uses: actions/mysql-action@v1 + with: + character set server: 'utf8' + mysql database: 'trip' + mysql user: ${DB_USERNAME} + mysql password: ${DB_PASSWORD} + - name: Grant execute permission for gradlew run: chmod +x ./gradlew shell: bash From b654d1f349d83c27700919e5fd5b3c2598bc9ab6 Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 15:28:07 +0900 Subject: [PATCH 11/12] =?UTF-8?q?fix:=20deploy.yml=20mysql=20uses=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/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 361ce3a1..eae2f90c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,7 +25,7 @@ jobs: java-version: 17 - name: Set up MySQL - uses: actions/mysql-action@v1 + uses: samin/mysql-action@v1 with: character set server: 'utf8' mysql database: 'trip' From ef51d22a57d1c3c820df8c890ca1603da0d93dec Mon Sep 17 00:00:00 2001 From: Jiyoon Kim Date: Wed, 10 Jan 2024 15:34:54 +0900 Subject: [PATCH 12/12] fix: set up mysql on yml --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index eae2f90c..53514de5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,8 +29,8 @@ jobs: with: character set server: 'utf8' mysql database: 'trip' - mysql user: ${DB_USERNAME} - mysql password: ${DB_PASSWORD} + mysql user: 'hdy' + mysql password: ${{ secrets.MYSQL_PASSWORD }} - name: Grant execute permission for gradlew run: chmod +x ./gradlew