Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
[Setting] .github 설정 (#28)
Browse files Browse the repository at this point in the history
* conf(CODEOWNERS): 코드오너 설정

* conf(PULL_REQUEST_TEMPLATE): PR 탬플릿 등록

* conf(ISSUE_TEMPLATE): ISSUE 탬플릿 등록

* conf(Continuous Intergration.yml): ISSUE 탬플릿 등록

* fix: gradle build가 동작하도록 `임시` 수정

* fix: gradle build가 성공하도록 권한 설정

* fix: CI 과정에서 submodule을 가져오도록 설정

* fix: CI 과정에 PAT 추가

* fix: CI 과정에 DB ENV 설정

* fix: jpa driver 명시

* fix: jpa db 명시

* fix: application properties 통일

* fix: firebaseconfig 재활성화

* fix: update submodule

* fix: kapt 및 boot 버전 맞춰주기

* fix: github action jvm distribution 수정

* refactor: CI 빌드를 소란스럽게

* fix: mySQL 8.3.0과 testcontainer 설정 충돌 해결

* refactor: CI가 간결하게 logging하도록 설정
  • Loading branch information
goldentrash authored Jan 23, 2024
1 parent acb9b2f commit 564bb6b
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @goldentrash @zbqmgldjfh
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/1-FEAT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature Request
description: 새로운 기능 구현
title: "[Feat]: ~~"
labels: "🚀 기능 구현 🚀"
assignees: ''

---

# 개요

~~ 기능 구현

## Todo

- [ ] ~~ 기능
- [ ] ~~ 기능
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 개요

~~ 기능 구현 (close #00)

## Todo

- [ ] ~~ 테스트 작성
- [ ] ~~ 모듈 구현

## 논의가 필요한 사항

~~ 모듈 구현 간에 ~~ 보다 더 좋은 방법이 있을까요?

---

### 등록 전 확인

- [ ] 모든 test가 pass했나요?
- [ ] 모든 code가 well-formatted인가요?
- [ ] commit message는 직관적이었을까요?
- [ ] 삭제해야 할, 주석처리 된 코드는 없을까요?
35 changes: 35 additions & 0 deletions .github/workflows/Continuous Integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Continuous Integration

on:
pull_request:
branches:
- 'develop'

jobs:
Test:
runs-on: ubuntu-22.04

env:
DB_URL: ${{ secrets.DB_URL }}
DB_USER: ${{ secrets.DB_USR }}
DB_PASSWORD: ${{ secrets.DB_PWD }}

steps:
- name: Set up sources
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
submodules: true

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: corretto
cache: gradle

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Execute Gradle build
run: ./gradlew build
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "3.2.1"
id("io.spring.dependency-management") version "1.1.4"
kotlin("kapt") version "1.9.21"
kotlin("kapt") version "1.9.20"
kotlin("jvm") version "1.9.21"
kotlin("plugin.spring") version "1.9.21"
kotlin("plugin.jpa") version "1.9.21"
Expand All @@ -21,9 +21,9 @@ allOpen {
}

noArg {
annotation("javax.persistence.Entity")
annotation("javax.persistence.MappedSuperclass")
annotation("javax.persistence.Embeddable")
annotation("jakarta.persistence.Entity")
annotation("jakarta.persistence.MappedSuperclass")
annotation("jakarta.persistence.Embeddable")
}

java {
Expand Down Expand Up @@ -55,7 +55,7 @@ dependencies {

// QueryDsl
implementation("com.querydsl:querydsl-jpa:5.0.0")
kapt("com.querydsl:querydsl-apt:5.0.0:jpa")
kapt("com.querydsl:querydsl-apt:5.0.0:jakarta")
kapt("org.springframework.boot:spring-boot-configuration-processor")

// firebase
Expand Down
7 changes: 5 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
spring:
jpa:
database: mysql
database-platform: org.hibernate.dialect.MySQLDialect
hibernate:
ddl-auto: create
properties:
Expand All @@ -9,9 +11,10 @@ spring:
show-sql: false
open-in-view: false
datasource:
password: ${DB_PASSWORD}
username: ${DB_USER}
url: ${DB_URL}
username: ${DB_USER}
password: ${DB_PASSWORD}
driver-class-name: com.mysql.cj.jdbc.Driver

local:
image:
Expand Down
49 changes: 49 additions & 0 deletions src/main/resources/mysql-default-conf/my.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[mysqld]
user = mysql
datadir = /var/lib/mysql
port = 3306
#socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
host_cache_size=0
skip-name-resolve

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
#server-id = 1

# Uncomment the following if you want to log updates
#log-bin=mysql-bin

# binary logging format - mixed recommended
#binlog_format=mixed

# Causes updates to non-transactional engines using statement format to be
# written directly to binary log. Before using this option make sure that
# there are no dependencies between transactional and non-transactional
# tables such as in the statement INSERT INTO t_myisam SELECT * FROM
# t_innodb; otherwise, slaves may diverge from the master.
#binlog_direct_non_transactional_updates=TRUE

# Uncomment the following if you are using InnoDB tables
innodb_data_file_path = ibdata1:10M:autoextend
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
18 changes: 9 additions & 9 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
spring:
datasource:
url: jdbc:tc:mysql:8:///plantory?TC_REUSABLE=true
username: plantory
password: plantory1234
driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
p6spy:
enable-logging: true
jpa:
database: mysql
database-platform: org.hibernate.dialect.MySQLDialect
hibernate:
ddl-auto: create
open-in-view: false
show-sql: true
properties:
hibernate:
format_sql: true
show-sql: true
open-in-view: false
datasource:
url: jdbc:tc:mysql:8:///plantory?TC_REUSABLE=true
username: plantory
password: plantory1234
driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver

local:
image:
Expand Down

0 comments on commit 564bb6b

Please sign in to comment.