Skip to content

Commit

Permalink
feat: 프로젝트 스캐폴딩 (#2)
Browse files Browse the repository at this point in the history
* feat: 프로젝트를 스캐폴딩한다

* fix: sonar 분석이 main에서 안되는 버그를 수정한다
  • Loading branch information
devxb authored Nov 30, 2023
1 parent 7f282b7 commit bba888a
Show file tree
Hide file tree
Showing 22 changed files with 684 additions and 0 deletions.
1 change: 1 addition & 0 deletions teum-teum-server/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @devxb @ddingmin @choidongkuen
14 changes: 14 additions & 0 deletions teum-teum-server/.github/ISSUE_TEMPLATE/issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: ISSUE TEMPLATE
about: 이슈 템플릿
title: ''
labels: ''
assignees: ''

---

## 기능

## Todo
- [ ] typing here...
- [ ] typing here...
19 changes: 19 additions & 0 deletions teum-teum-server/.github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
PR 타이틀 = 행위: 도메인이 드러나는 설명
-->

## 🚀 어떤 기능을 개발했나요?


## 🕶️ 어떻게 해결했나요?


## 🦀 이슈 넘버

<!--
## (option) 어떤 부분에 집중하여 리뷰해야 할까요?
-->

<!--
## 참고자료
-->
14 changes: 14 additions & 0 deletions teum-teum-server/.github/workflows/auto-assigner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 👌Auto assigner

on:
pull_request:
types:
- opened

jobs:
assign:
runs-on: ubuntu-latest
steps:
- uses: hkusu/review-assign-action@v1
with:
assignees: ${{ github.actor }}
44 changes: 44 additions & 0 deletions teum-teum-server/.github/workflows/integration-tester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: ✅Integration tester

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Test and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'zulu'

- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

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

- name: Test and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew test sonar --info
76 changes: 76 additions & 0 deletions teum-teum-server/.github/workflows/type-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 🏷️ Type labeler

on:
pull_request:
issues:

jobs:
add_label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v3

- name: add ✨ feature label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'feat:') }}
with:
labels: ✨ feature

- name: add 🐛 bug-fix label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'fix:') }}
with:
labels: 🐛 bug-fix

- name: add ♻️ refactor label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'refactor:') }}
with:
labels: ♻️ refactor

- name: add 🎨 style label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'style:') }}
with:
labels: 🎨 style

- name: add 🏗️ build label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'chore:') }}
with:
labels: 🏗️ build

- name: add ✅ test label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'test:') }}
with:
labels: ✅ test

- name: add 📝 docs label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'docs:') }}
with:
labels: 📝 docs

- name: add 👷 ci label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'ci:') }}
with:
labels: 👷 ci

- name: add ⚡️ perf label
uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.title, 'perf:') }}
with:
labels: ⚡️ perf

- name: add 🔖 release label
uses: actions-ecosystem/action-add-labels@v1
if: ${{ startsWith(github.event.pull_request.title, 'release:') }}
with:
labels: 🔖 release

39 changes: 39 additions & 0 deletions teum-teum-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea
*.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
23 changes: 23 additions & 0 deletions teum-teum-server/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
id 'java-library'
id 'org.springframework.boot' apply false
id 'io.spring.dependency-management'
id 'org.sonarqube'
}

apply from: "gradle/spring.gradle"
apply from: "gradle/devtool.gradle"
apply from: "gradle/junit.gradle"
apply from: "gradle/sonar.gradle"
apply from: "gradle/db.gradle"

allprojects {

group = "${projectGroup}"
version = "${projectVersion}"

repositories {
mavenCentral()
}

}
19 changes: 19 additions & 0 deletions teum-teum-server/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### PROJECT ###
projectGroup=net.teumteum
projectVersion=1.0

### JUNIT ###
junitVersion=5.10.1

### LOMBOK ###
lombokVersion=1.18.30

### SPRING ###
springBootVersion=3.2.0
springDependencyManagementVersion=1.1.4

### SONAR ###
sonarVersion=4.4.1.3373

### MYSQL ###
mysqlConnectorVersion=8.0.33
7 changes: 7 additions & 0 deletions teum-teum-server/gradle/db.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dependencies {
implementation "org.flywaydb:flyway-core"
implementation "org.flywaydb:flyway-mysql"
implementation "mysql:mysql-connector-java:${mysqlConnectorVersion}"

testRuntimeOnly "com.h2database:h2"
}
9 changes: 9 additions & 0 deletions teum-teum-server/gradle/devtool.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
allprojects {
dependencies {
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok"

testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok"
}
}
13 changes: 13 additions & 0 deletions teum-teum-server/gradle/junit.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
allprojects {
apply plugin: "java-library"

test {
useJUnitPlatform()
}

dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
}
7 changes: 7 additions & 0 deletions teum-teum-server/gradle/sonar.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sonar {
properties {
property "sonar.projectKey", "depromeet_teum-teum-server"
property "sonar.organization", "depromeet-1"
property "sonar.host.url", "https://sonarcloud.io"
}
}
23 changes: 23 additions & 0 deletions teum-teum-server/gradle/spring.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
allprojects {
apply plugin: "java-library"
apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"

bootJar.enabled = false
jar.enabled = true

if (rootProject.name == name) {
bootJar.enabled = true
}

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.boot:spring-boot-starter-actuator"

runtimeOnly 'io.micrometer:micrometer-registry-prometheus'

testImplementation "org.springframework.boot:spring-boot-starter-test"
}
}
Binary file not shown.
6 changes: 6 additions & 0 deletions teum-teum-server/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Wed Nov 29 19:28:55 KST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit bba888a

Please sign in to comment.