From 0087f9a371348a6bf1051dc3e078b9ab9a241dbe Mon Sep 17 00:00:00 2001 From: dlsrks1021 Date: Fri, 11 Jul 2025 14:28:13 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20Test=20DB=20=EB=AF=B8=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=8B=A4=ED=8C=A8=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/build.gradle | 1 + .../src/main/java/io/f1/backend/domain/user/entity/User.java | 2 ++ backend/src/test/resources/application.yml | 5 +++++ 3 files changed, 8 insertions(+) create mode 100644 backend/src/test/resources/application.yml diff --git a/backend/build.gradle b/backend/build.gradle index 1ec1fead..42306b8b 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -38,6 +38,7 @@ dependencies { testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testImplementation 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' + testRuntimeOnly 'com.h2database:h2' /* ETC */ annotationProcessor 'org.projectlombok:lombok' diff --git a/backend/src/main/java/io/f1/backend/domain/user/entity/User.java b/backend/src/main/java/io/f1/backend/domain/user/entity/User.java index eae02506..e28355a7 100644 --- a/backend/src/main/java/io/f1/backend/domain/user/entity/User.java +++ b/backend/src/main/java/io/f1/backend/domain/user/entity/User.java @@ -11,9 +11,11 @@ import jakarta.persistence.Id; import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import java.time.LocalDateTime; @Entity +@Table(name = "`user`") public class User extends BaseEntity { @Id diff --git a/backend/src/test/resources/application.yml b/backend/src/test/resources/application.yml new file mode 100644 index 00000000..384b0bcb --- /dev/null +++ b/backend/src/test/resources/application.yml @@ -0,0 +1,5 @@ +spring: + datasource: + url: jdbc:h2:mem:testdb;MODE=MYSQL + username: sa + password: \ No newline at end of file From 1de1e00ab78a38574defc5bf1b42e3083b8b9893 Mon Sep 17 00:00:00 2001 From: dlsrks1021 Date: Fri, 11 Jul 2025 14:30:44 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20test=20workflow=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..643745c3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Test +on: + pull_request: + branches: [ dev ] +jobs: + test: + runs-on: ubuntu-latest + permissions: + contents: read + env: + PROJECT_DIR: backend + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Run tests + run: ./gradlew test + working-directory: ${{ env.PROJECT_DIR }} + + - name: Upload test report + if: always() + + uses: actions/upload-artifact@v4 + with: + name: junit-test-report + path: ${{ env.PROJECT_DIR }}/build/reports/tests/test + include-hidden-files: true From de121d66d353cb7b6d671e499660a703973c423c Mon Sep 17 00:00:00 2001 From: dlsrks1021 Date: Fri, 11 Jul 2025 14:38:05 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20build.gradle=20tab=20=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/build.gradle b/backend/build.gradle index 42306b8b..e5a4520f 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -38,7 +38,7 @@ dependencies { testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testImplementation 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' - testRuntimeOnly 'com.h2database:h2' + testRuntimeOnly 'com.h2database:h2' /* ETC */ annotationProcessor 'org.projectlombok:lombok' From bd5a3788d264eb323814f415d40be6f5206b733b Mon Sep 17 00:00:00 2001 From: github-actions <> Date: Fri, 11 Jul 2025 05:38:34 +0000 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20Java=20=EC=8A=A4=ED=83=80=EC=9D=BC?= =?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 --- .../src/main/java/io/f1/backend/domain/user/entity/User.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/f1/backend/domain/user/entity/User.java b/backend/src/main/java/io/f1/backend/domain/user/entity/User.java index e28355a7..ec19a33d 100644 --- a/backend/src/main/java/io/f1/backend/domain/user/entity/User.java +++ b/backend/src/main/java/io/f1/backend/domain/user/entity/User.java @@ -10,8 +10,8 @@ import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.OneToOne; - import jakarta.persistence.Table; + import java.time.LocalDateTime; @Entity