Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Setting project denpendency, CI, github projects #2

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @devxb @inpink
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 요약

# 어떻게 구현했는지

# 이슈번호
<!-- 다음과 같이 작성해주세요. - close #1 -->
38 changes: 38 additions & 0 deletions .github/workflows/integrations-tester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: ✅ Integration tester
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'

jobs:
build:
name: Integration test
runs-on: ubuntu-latest
strategy:
matrix:
kotlin-version: [ 1.9.22 ]
java-version: [ 21 ]

steps:
- name: checkout code
uses: actions/checkout@v3

- name: Set up JDK 21 and Kotlin 1.9.22
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
kotlin-version: ${{ matrix.kotlin-version }}

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Build and analyze
run: ./gradlew clean test
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store

.idea
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
# misik-api
29 changes: 29 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
plugins {
id "application"
id "org.jetbrains.kotlin.jvm" version "${jetbrainKotlinVersion}"
id "org.jetbrains.kotlin.plugin.spring" version "${jetbrainKotlinVersion}"
id 'org.jetbrains.kotlin.plugin.jpa' version "${jetbrainKotlinVersion}"
id "org.springframework.boot" version "${springbootVersion}"
id "io.spring.dependency-management" version "${springDependencyManagementVersion}"
}

group = "${group}"
version = "${version}"

repositories {
mavenCentral()
}

test {
useJUnitPlatform()
}

application {
mainClassName = 'com.misik.api.Application'
}

apply from: "gradle/db.gradle"
apply from: "gradle/core.gradle"
apply from: "gradle/test.gradle"
apply from: "gradle/spring.gradle"
apply from: "gradle/jetbrains.gradle"
30 changes: 30 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
kotlin.code.style=official

### Project ###
group=com.misik.api
version=1.0

### Spring ###
springDependencyManagementVersion=1.1.1
springbootVersion=3.4.1
springMockkVersion=4.0.0

### Jetbrain ###
jetbrainKotlinVersion=1.9.22
jvmTarget=21

### Database ###
mysqlConnectorVersion=8.0.33

### Kotest ###
kotestVersion=5.7.2
kotestExtensionSpringVersion=1.1.3

### TestContainer ###
testContainerVersion=1.19.3

### Netx ###
netxVersion=0.4.8

### H2version ###
h2Version=1.4.200
3 changes: 3 additions & 0 deletions gradle/core.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies {
implementation "org.rooftopmsa:netx:${netxVersion}"
}
5 changes: 5 additions & 0 deletions gradle/db.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dependencies {
implementation "mysql:mysql-connector-java:${mysqlConnectorVersion}"

testRuntimeOnly "com.h2database:h2:${h2Version}"
}
13 changes: 13 additions & 0 deletions gradle/jetbrains.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
compileKotlin {
kotlinOptions.jvmTarget = "${jvmTarget}"
}

compileTestKotlin {
kotlinOptions.jvmTarget = "${jvmTarget}"
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-reflect"

testImplementation "org.jetbrains.kotlin:kotlin-test"
}
12 changes: 12 additions & 0 deletions gradle/spring.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
jar {
enabled = false
}

dependencies {
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation 'org.springframework.retry:spring-retry'

testImplementation "org.springframework.boot:spring-boot-starter-test"
}
13 changes: 13 additions & 0 deletions gradle/test.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
test {
useJUnitPlatform()
}

dependencies {
testImplementation "io.kotest:kotest-runner-junit5:${kotestVersion}"
testImplementation "io.kotest:kotest-assertions-core:${kotestVersion}"
testImplementation "io.kotest.extensions:kotest-extensions-spring:${kotestExtensionSpringVersion}"

testImplementation "org.testcontainers:testcontainers:${testContainerVersion}"

testImplementation "com.ninja-squad:springmockk:${springMockkVersion}"
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading