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

YEL-139 [merge] 실서버 배포 #265

Merged
merged 63 commits into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
822dd1f
YEL-132 [hotfix] deploy 스크립트 수정
devkwonsehoon Aug 22, 2023
79ce2e2
YEL-132 [hotfix] deploy 스크립트 수정
devkwonsehoon Aug 22, 2023
9d0ffc7
YEL-139 [merge] 충돌 방지를 위한 코드 병합
devkwonsehoon Aug 22, 2023
2402ddd
YEL-132 [hotfix] if문에서 case문으로 바꿈
myheyjay Aug 22, 2023
d6cf78d
YEL-132 [hotfix] if문에서 case문으로 바꿈
euije Aug 22, 2023
a4d5dc8
YEL-132 [deploy] test - 1.1.0v
euije Aug 22, 2023
ecd814c
YEL-139 [merge] 충돌 방지를 위한 코드 병합
devkwonsehoon Aug 23, 2023
32b9de7
YEL-139 [test] restdocs 의존성 추가
devkwonsehoon Aug 23, 2023
b0eed80
YEL-139 [test] restdoc 파일 생성
devkwonsehoon Aug 23, 2023
5d95535
YEL-139 [test] API url 변경에 따른 테스트 코드 수정 및 일부 로직 개선
devkwonsehoon Aug 23, 2023
eebd3fb
YEL-139 [test] 컨트롤러 테스트를 위한 유틸 객체 생성
devkwonsehoon Aug 23, 2023
bb19410
YEL-139 [test] JPA Configuration 분리
devkwonsehoon Aug 23, 2023
e163af4
YEL-139 [test] 성공 케이스 세분화
devkwonsehoon Aug 23, 2023
7bcf078
YEL-139 [test] 어색한 API Url 수정
devkwonsehoon Aug 23, 2023
2ce723b
YEL-139 [test] 메서드 및 클래스 이름 통일
devkwonsehoon Aug 23, 2023
1a3f431
YEL-139 [test] 컨트롤러 유닛 테스트 추가
devkwonsehoon Aug 23, 2023
c5ff2fb
YEL-139 [test] bootJar시 restdocs 스크립트 실행하도록 수정
devkwonsehoon Aug 23, 2023
78e2190
YEL-139 [test] 테스트를 위한 Builder 패턴 적용
devkwonsehoon Aug 23, 2023
8cd0555
YEL-139 [test] Swagger 의존성 제거
devkwonsehoon Aug 23, 2023
f2c2c70
YEL-139 [test] Github action 스크립트 수정
devkwonsehoon Aug 23, 2023
72bf1e2
YEl-141 [fix] 옐로 플러스 한경우 포인트 안까이도록 설정
hyeonjeongs Aug 23, 2023
3f1d0f3
YEL-141 [fix] 옐로 플러스인 경우 포인트 안까이도록 설정
hyeonjeongs Aug 23, 2023
628fa4e
YEL-139 [test] Random 성능을 위해 ThreadLocalRandom 사용
devkwonsehoon Aug 25, 2023
e136c16
YEL-139 [test] 코드 정리
devkwonsehoon Aug 25, 2023
4abcde5
YEL-139 [test] Factory 테스트 코드 작성
devkwonsehoon Aug 25, 2023
d68c8fc
YEL-139 [test] ListFactory 테스트 코드 작성
devkwonsehoon Aug 25, 2023
2e93946
YEL-139 [test] PaginationFactory 테스트 코드 작성
devkwonsehoon Aug 25, 2023
70a4fbf
YEL-139 [test] 테스트 코드 개선
devkwonsehoon Aug 25, 2023
84fc647
YEL-139 [test] 커버리지 계산을 위한 jacoco 세팅
devkwonsehoon Aug 25, 2023
cb776c8
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
6d81168
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
26a891e
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
f272477
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
d7ccf7b
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
542bd28
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
da89e30
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
c234e19
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
59334ba
YEL-139 [test] Slack 웹훅 역할 분리
devkwonsehoon Aug 25, 2023
0205ec3
YEL-139 [refactor] 컨트롤러 유닛 테스트 및 문서화 작업
devkwonsehoon Aug 25, 2023
cfc6dcc
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
fc17e89
YEL-139 [test] Github Action 테스트 스크립트 수정
devkwonsehoon Aug 25, 2023
a1fb256
YEL-139 [test] 어색한 메서드명 변경
devkwonsehoon Aug 25, 2023
ec9c3c4
YEL-139 [test] 테스트 코드 추가
devkwonsehoon Aug 25, 2023
7aac394
YEL-139 [test] 테스트 코드 추가 및 어색한 메서드명 수정
devkwonsehoon Aug 25, 2023
13ea286
YEL-139 [test] 테스트 코드 추가 및 API 문서 이전
devkwonsehoon Aug 25, 2023
943d649
YEL-139 [test] 빌드 스크립트 수정
devkwonsehoon Aug 25, 2023
e81fac0
YEL-139 [test] 빌드 스크립트 수정
devkwonsehoon Aug 25, 2023
7fd37a1
YEL-139 [test] 명세서 Filter 예외 처리
devkwonsehoon Aug 25, 2023
e162e82
YEL-139 [test] 명세서 Filter 예외 처리
devkwonsehoon Aug 25, 2023
904a334
YEL-139 [test] 명세서 추가
devkwonsehoon Aug 25, 2023
f2e53c9
YEL-139 [test] Test 스크립트 수정
devkwonsehoon Aug 25, 2023
483d214
YEL-139 [test] 명세서 추가
devkwonsehoon Aug 25, 2023
5f376ff
YEL-145 [fix] soft deleted 유저의 yelloId 중복 체크
myheyjay Aug 26, 2023
11b2cb4
YEL-145 [fix] soft deleted 유저의 yelloId 중복 체크
euije Aug 26, 2023
41df0a6
YEL-144 [fix] apple 결제 수정
hyeonjeongs Aug 26, 2023
f6bfebd
YEL-144 [fix] apple 결제 json 오류 수정
hyeonjeongs Aug 26, 2023
2ec2858
YEL-139 [merge] 충돌 방지를 위한 코드 병합
devkwonsehoon Aug 27, 2023
a777056
YEL-139 [test] 구글 결제 관련 명세서 수정
devkwonsehoon Aug 27, 2023
a195120
YEL-139 [test] 구글 결제 관련 명세서 수정
devkwonsehoon Aug 27, 2023
9461884
YEL-139 [test] 구글 결제 관련 명세 수정 및 일부 코드 로직 수정
devkwonsehoon Aug 27, 2023
f6b3988
YEL-139 [docs] 명세서 오류 수정
devkwonsehoon Aug 27, 2023
1835ccb
YEL-139 [docs] 명세서 오류 수정
devkwonsehoon Aug 27, 2023
f3327bf
Merge branch 'main' into staging
devkwonsehoon Aug 27, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
shell: bash

- name: 🐘 Gradle로 빌드 실행
run: ./gradlew build -x test
run: ./gradlew build

- name: 💡 배포 상태를 Slack을 통해 전송합니다.
uses: rtCamp/action-slack-notify@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
shell: bash

- name: 🐘 Gradle로 빌드 실행
run: ./gradlew build -x test
run: ./gradlew build

- name: 📦 배포를 진행하기 위한 .zip 파일을 생성합니다.
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
shell: bash

- name: 🐘 Gradle로 빌드 실행
run: ./gradlew build -x test
run: ./gradlew build

- name: 📦 배포를 진행하기 위한 .zip 파일을 생성합니다.
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ on:
branches: [ "develop", "staging" ]

permissions:
contents: write
checks: write
id-token: write
pull-requests: write

jobs:
build:
Expand Down Expand Up @@ -52,7 +51,7 @@ jobs:
run: ./gradlew test

- name: 💬 테스트 결과를 코멘트로 등록합니다.
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: '**/build/test-results/test/TEST-*.xml'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ firebase*.json

### monitoring ###
monitoring/prometheus/volume
monitoring/grafana
monitoring/grafana
124 changes: 74 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
buildscript {
ext {
queryDslVersion = "5.0.0"
}
}

plugins {
id 'java'
id 'org.springframework.boot' version '2.7.4'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
id "org.asciidoctor.jvm.convert" version "3.3.2"
id 'jacoco'
}

group = 'com.yello'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

ext {
snippetsDir = file('build/generated-snippets')
}

java {
sourceCompatibility = '17'
test {
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
outputs.dir snippetsDir
}

configurations {
asciidoctorExt
compileOnly {
extendsFrom annotationProcessor
}
Expand All @@ -32,31 +35,23 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.4.2'

// JPA & Database
// Repositories
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'

implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.amqp:spring-rabbit:2.3.12'

runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j:8.0.31'

// Validations
implementation 'org.springframework.boot:spring-boot-starter-validation'

// Health Check
implementation 'org.springframework.boot:spring-boot-starter-actuator'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'


// JWT
implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2'


// Swagger
implementation 'org.springdoc:springdoc-openapi-ui:1.5.4'

// p6spy
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.7'

Expand All @@ -67,20 +62,9 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.79.Final:osx-aarch_64'


// QueryDSL
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}"
implementation "com.querydsl:querydsl-apt:${queryDslVersion}"

runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j:8.0.31'

// FCM
implementation 'com.google.firebase:firebase-admin:9.2.0'

// rabbitmq
implementation 'org.springframework.amqp:spring-rabbit:2.3.12'

// slack-webhook
implementation "net.gpedro.integrations.slack:slack-webhook:1.4.0"

Expand All @@ -90,32 +74,72 @@ dependencies {

// gson
implementation 'com.google.code.gson:gson:2.10.1'
}

tasks.named('test') {
useJUnitPlatform()
// Testing
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.4.2'
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.springframework.security:spring-security-test'
}

asciidoctor {
inputs.dir snippetsDir
configurations 'asciidoctorExt'
dependsOn test
}

def querydslDir = "$buildDir/generated/querydsl"

querydsl {
jpa = true
querydslSourcesDir = querydslDir
asciidoctor.doFirst {
delete file('src/docs/asciidocs')
}
sourceSets {
main.java.srcDir querydslDir

bootJar {
dependsOn asciidoctor
copy {
from asciidoctor.outputDir
into "src/main/resources/static/docs"
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
}
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}

jar {
enabled = false
}
jar.enabled = false

jacoco.toolVersion = "0.8.7"
jacocoTestReport {
reports {
xml.enabled false
csv.enabled true
html.enabled true

csv.destination file("${buildDir}/jacoco/index.csv")
html.destination file("${buildDir}/jacoco/index.html")
}
// finalizedBy 'jacocoTestCoverageVerification'
}
//jacocoTestCoverageVerification {
// violationRules {
// rule {
// enabled = true
// element = 'CLASS'
//
// limit {
// counter = 'METHOD'
// value = 'COVEREDRATIO'
// minimum = 0.60
// }
//
// limit {
// counter = 'INSTRUCTION'
// value = 'COVEREDRATIO'
// minimum = 0.60
// }
//
// excludes = ["*.dto", "*.dto.*", "*.ServerApplication", "*.configuration.*", "*.security.*", "*.exception.*", "*.util.*"]
// }
// }
//}
13 changes: 13 additions & 0 deletions src/docs/asciidoc/add-friend.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== 친구 추가하기

=== 요청

include::{snippets}/api/v1/friend/addFriend/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/friend/addFriend/path-parameters.adoc[]

=== 응답

include::{snippets}/api/v1/friend/addFriend/http-response.adoc[]
29 changes: 29 additions & 0 deletions src/docs/asciidoc/apple.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
== Apple 구독 구매 검증하기

=== 요청

include::{snippets}/api/v1/purchase/verifyAppleSubscriptionTransaction/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/purchase/verifyAppleSubscriptionTransaction/http-response.adoc[]

== Apple 열람권 구매 검증하기

=== 요청

include::{snippets}/api/v1/purchase/verifyAppleTicketTransaction/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/purchase/verifyAppleTicketTransaction/http-response.adoc[]

== Apple 환불하기

=== 요청

include::{snippets}/api/v1/purchase/refundInAppApple/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/purchase/refundInAppApple/http-response.adoc[]
13 changes: 13 additions & 0 deletions src/docs/asciidoc/check-keyword.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== 투표 키워드 확인하기

=== 요청

include::{snippets}/api/v1/vote/checkKeyword/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/vote/checkKeyword/path-parameters.adoc[]

=== 응답

include::{snippets}/api/v1/vote/checkKeyword/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/check-user-by-id.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 유저 정보 조회하기

=== 요청

include::{snippets}/api/v1/user/findUserById/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/user/findUserById/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/check-user.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 내 정보 조회하기

=== 요청

include::{snippets}/api/v1/user/findUser/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/user/findUser/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/check-vote-available.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 투표 가능 여부 조회

=== 요청

include::{snippets}/api/v1/vote/checkVoteAvailable/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/vote/checkVoteAvailable/http-response.adoc[]
10 changes: 10 additions & 0 deletions src/docs/asciidoc/create-vote.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
== 투표 생성하기

=== 요청

include::{snippets}/api/v1/vote/createVote/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/vote/createVote/http-response.adoc[]

13 changes: 13 additions & 0 deletions src/docs/asciidoc/delete-friend.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== 친구 삭제하기

=== 요청

include::{snippets}/api/v1/friend/deleteFriend/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/friend/deleteFriend/path-parameters.adoc[]

=== 응답

include::{snippets}/api/v1/friend/deleteFriend/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/delete-user.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 유저 탈퇴하기

=== 요청

include::{snippets}/api/v1/user/deleteUser/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/user/deleteUser/http-response.adoc[]
9 changes: 9 additions & 0 deletions src/docs/asciidoc/device-token.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
== 디바이스 토큰 수정하기

=== 요청

include::{snippets}/api/v1/user/updateUserDeviceToken/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/user/updateUserDeviceToken/http-response.adoc[]
13 changes: 13 additions & 0 deletions src/docs/asciidoc/find-friend-votes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== 친구 투표 전체 조회

=== 요청

include::{snippets}/api/v1/vote/findAllFriendVotes/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/vote/findAllFriendVotes/request-parameters.adoc[]

=== 응답

include::{snippets}/api/v1/vote/findAllFriendVotes/http-response.adoc[]
Loading
Loading