diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml new file mode 100644 index 0000000..43c7044 --- /dev/null +++ b/.github/workflows/dev_deploy.yml @@ -0,0 +1,37 @@ +# 워크플로우 이름 +name: MinKyu_Umc9th + + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +# 실행될 작업 정의 +jobs: + + build: + # OS 환경 지정 + runs-on: ubuntu-latest + + # 작업 단계들 + steps: + # 1. 리포지토리 코드를 가져오기 + - name: Checkout repository + uses: actions/checkout@v4 + + # 2. JDK 24 설치 + - name: Set up JDK 24 + uses: actions/setup-java@v4 + with: + java-version: '24' + distribution: 'temurin' + + # 3. gradlew 실행 권한 부여 + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + + # 4. Gradle로 빌드 및 테스트 실행 + - name: Build with Gradle + run: ./gradlew build \ No newline at end of file diff --git a/build.gradle b/build.gradle index ee064e0..7617478 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,9 @@ description = 'Demo project for Spring Boot' java { toolchain { - languageVersion = JavaLanguageVersion.of(21) + //languageVersion = JavaLanguageVersion.of(21) + languageVersion = JavaLanguageVersion.of(24) + } } @@ -25,6 +27,7 @@ repositories { } dependencies { + testImplementation 'com.h2database:h2' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 015c9db..98447bd 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -3,17 +3,17 @@ spring: name: "umc_9th" # "umc9th" datasource: - driver-class-name: com.mysql.cj.jdbc.Driver # MySQL JDBC ???? ??? ?? - url: jdbc:mysql://localhost:3306/umc9th # jdbc:mysql://localhost:3306/{???????} + driver-class-name: com.mysql.cj.jdbc.Driver # + url: jdbc:mysql://localhost:3306/umc9th # username: root # MySQL ?? ?? password: 1234 # MySQL ???? jpa: - database: mysql # ??? ?????? ?? ?? (MySQL) - database-platform: org.hibernate.dialect.MySQLDialect # Hibernate?? ??? MySQL ??(dialect) ?? - show-sql: true # ??? SQL ??? ??? ???? ?? ?? + database: mysql # + database-platform: org.hibernate.dialect.MySQLDialect # + show-sql: true # hibernate: - ddl-auto: create # ?????? ?? ? ?????? ???? ??? ?? + ddl-auto: create # properties: hibernate: - format_sql: true # ???? SQL ??? ?? ?? ??? \ No newline at end of file + format_sql: true # \ No newline at end of file diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml new file mode 100644 index 0000000..b9c6788 --- /dev/null +++ b/src/test/resources/application.yml @@ -0,0 +1,11 @@ +spring: + datasource: + url: jdbc:h2:mem:testdb + driver-class-name: org.h2.Driver + username: sa + password: + + jpa: + database-platform: org.hibernate.dialect.H2Dialect + hibernate: + ddl-auto: create-drop \ No newline at end of file