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/#58 #59

Merged
merged 9 commits into from
Oct 2, 2024
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
8 changes: 5 additions & 3 deletions .github/workflows/amorgakco-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ jobs:
distribution: 'temurin'
- name: Apply Environment Variables
run: |
echo "${{ secrets.FCM_SECRET }}" | base64 -d > ./src/test/resources/fcm-secret.json
echo "${{ secrets.FCM_SECRET }}" | base64 -d > ./src/main/resources/fcm-secret.json
echo "${{ secrets.APPLICATION_JWT }}" > src/test/resources/application-jwt.yml
echo "${{ secrets.APPLICATION_OAUTH2 }}" > src/test/resources/application-oauth2.yml
echo "${{ secrets.FCM_SECRET }}" | base64 -d > src/test/resources/fcm-secret.json
echo "${{ secrets.APPLICATION_NOTIFICATION }}" > src/test/resources/application-notification.yml
- run: chmod +x gradlew
- run: ./gradlew build
- name: 테스트 커버리지를 PR에 코멘트에 등록
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
title: 📝 테스트 커버리지 리포트입니다
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
paths: ${{ github.workspace }}/main/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 40
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ src/test/resources/application-notification.yml
docker/
.docker-conf/

/docs

### STS ###
.apt_generated
Expand Down
2 changes: 1 addition & 1 deletion main/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ src/test/resources/application-notification.yml
docker/
.docker-conf/


/main/resources/static/**
### STS ###
.apt_generated
.classpath
Expand Down
6 changes: 3 additions & 3 deletions main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ dependencies {
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.5'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.5.Final'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.hibernate:hibernate-spatial:6.5.0.Final'
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testCompileOnly 'org.projectlombok:lombok'
Expand All @@ -59,6 +58,7 @@ dependencies {
testImplementation "org.testcontainers:junit-jupiter:1.16.3"
testImplementation "com.redis:testcontainers-redis:2.0.1"
testImplementation "org.testcontainers:mysql:1.17.2"
implementation "org.springframework.retry:spring-retry"
}

tasks.named('test') {
Expand All @@ -74,8 +74,8 @@ tasks.named('test') {
ext {
set('snippetsDir', file("build/generated-snippets"))
set('docsOutputDir', file("build/docs/asciidoc"))
set('projectDocsDir', file("src/main/resources/static/docs"))
set('deployDocsDir', file("docs"))
set('projectDocsDir', file("main/src/main/resources/static/docs"))
set('deployDocsDir', file("../docs"))
}

tasks.named('asciidoctor') {
Expand Down
89 changes: 67 additions & 22 deletions main/docs/index.html → main/main/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ <h1>AmorGakCo API: 위치기반 모각코 모임 서비스</h1>
<ul class="sectlevel2">
<li><a href="#_참여자_위치_인증">참여자 위치 인증</a></li>
<li><a href="#_참여자의_모각코_참여_내역">참여자의 모각코 참여 내역</a></li>
<li><a href="#_참여자_모각코_온도_올리기">참여자 모각코 온도 올리기</a></li>
<li><a href="#_참여자_모각코_온도_낮추기">참여자 모각코 온도 낮추기</a></li>
<li><a href="#_참여자_지각_요청">참여자 지각 요청</a></li>
</ul>
</li>
<li><a href="#_jwt">Jwt</a>
Expand Down Expand Up @@ -516,15 +519,15 @@ <h4 id="_그룹_등록_http_request"><a class="link" href="#_그룹_등록_http_
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">POST /groups HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 293
Content-Length: 291
Host: localhost:8080

{
"name" : "AmorGakCo",
"description" : "모각코 합시다.",
"groupCapacity" : 4,
"beginAt" : "2024-09-22T16:36:39.843631",
"endAt" : "2024-09-22T19:36:39.843631",
"beginAt" : "2024-10-01T19:02:21.96202",
"endAt" : "2024-10-01T22:02:21.96202",
"latitude" : 37.5703901,
"longitude" : 126.9748397,
"address" : "서울특별시 종로구 신문로1가 23"
Expand Down Expand Up @@ -596,16 +599,16 @@ <h4 id="_그룹_단건_조회_모달창용_http_response"><a class="link" href="
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 359
Content-Length: 358

{
"status" : "success",
"path" : "/groups/basic/1",
"data" : {
"hostNickname" : "아모르겠고",
"hostImgUrl" : "https://fakeimg",
"beginAt" : "2024-09-22T16:36:39.743266",
"endAt" : "2024-09-22T19:36:39.743272",
"beginAt" : "2024-10-01T19:02:21.86783",
"endAt" : "2024-10-01T22:02:21.867838",
"groupCapacity" : 4,
"currentParticipants" : 3,
"address" : "서울특별시 종로구 신문로1가 23"
Expand Down Expand Up @@ -679,7 +682,7 @@ <h4 id="_그룹_단건_조회_상세페이지용_http_response"><a class="link"
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 880
Content-Length: 879

{
"status" : "success",
Expand All @@ -697,8 +700,8 @@ <h4 id="_그룹_단건_조회_상세페이지용_http_response"><a class="link"
"address" : "서울특별시 종로구 신문로1가 23",
"longitude" : 126.9748397,
"latitude" : 37.5703901,
"beginAt" : "2024-09-22T16:36:39.743266",
"endAt" : "2024-09-22T19:36:39.743272",
"beginAt" : "2024-10-01T19:02:21.86783",
"endAt" : "2024-10-01T22:02:21.867838",
"groupMembers" : [ {
"memberId" : 2,
"imgUrl" : "https://fakeimg",
Expand Down Expand Up @@ -1098,45 +1101,87 @@ <h4 id="_참여자의_모각코_참여_내역_http_response"><a class="link" hre
"groupId" : 4,
"name" : "AmorGakCo",
"address" : "서울특별시 종로구 신문로1가 23",
"beginAt" : "2024-09-22T16:36:41.721794",
"endAt" : "2024-09-22T19:36:41.721804"
"beginAt" : "2024-10-01T19:02:23.875982",
"endAt" : "2024-10-01T22:02:23.875989"
}, {
"groupId" : 5,
"name" : "AmorGakCo",
"address" : "서울특별시 종로구 신문로1가 23",
"beginAt" : "2024-09-22T16:36:41.721794",
"endAt" : "2024-09-22T19:36:41.721804"
"beginAt" : "2024-10-01T19:02:23.875982",
"endAt" : "2024-10-01T22:02:23.875989"
}, {
"groupId" : 6,
"name" : "AmorGakCo",
"address" : "서울특별시 종로구 신문로1가 23",
"beginAt" : "2024-09-22T16:36:41.721794",
"endAt" : "2024-09-22T19:36:41.721804"
"beginAt" : "2024-10-01T19:02:23.875982",
"endAt" : "2024-10-01T22:02:23.875989"
} ],
"InactivatedGroup" : [ {
"groupId" : 1,
"name" : "AmorGakCo",
"address" : "서울특별시 종로구 신문로1가 23",
"beginAt" : "2024-09-22T16:36:41.721794",
"endAt" : "2024-09-22T19:36:41.721804"
"beginAt" : "2024-10-01T19:02:23.875982",
"endAt" : "2024-10-01T22:02:23.875989"
}, {
"groupId" : 2,
"name" : "AmorGakCo",
"address" : "서울특별시 종로구 신문로1가 23",
"beginAt" : "2024-09-22T16:36:41.721794",
"endAt" : "2024-09-22T19:36:41.721804"
"beginAt" : "2024-10-01T19:02:23.875982",
"endAt" : "2024-10-01T22:02:23.875989"
}, {
"groupId" : 3,
"name" : "AmorGakCo",
"address" : "서울특별시 종로구 신문로1가 23",
"beginAt" : "2024-09-22T16:36:41.721794",
"endAt" : "2024-09-22T19:36:41.721804"
"beginAt" : "2024-10-01T19:02:23.875982",
"endAt" : "2024-10-01T22:02:23.875989"
} ]
}
}</code></pre>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_참여자_모각코_온도_올리기"><a class="link" href="#_참여자_모각코_온도_올리기">참여자 모각코 온도 올리기</a></h3>
<div class="sect3">
<h4 id="_참여자_모각코_온도_올리기_http_request"><a class="link" href="#_참여자_모각코_온도_올리기_http_request">HTTP request</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">PATCH /participants/2/groups/1/temperature-increase HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_참여자_모각코_온도_올리기_http_response"><a class="link" href="#_참여자_모각코_온도_올리기_http_response">HTTP response</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json;charset=UTF-8
Content-Length: 126

{
"status" : "success",
"path" : "/participants/2/groups/1/temperature-increase",
"data" : {
"temperature" : 1
}
}</code></pre>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_참여자_모각코_온도_낮추기"><a class="link" href="#_참여자_모각코_온도_낮추기">참여자 모각코 온도 낮추기</a></h3>

</div>
<div class="sect2">
<h3 id="_참여자_지각_요청"><a class="link" href="#_참여자_지각_요청">참여자 지각 요청</a></h3>

</div>
</div>
</div>
Expand Down Expand Up @@ -1401,7 +1446,7 @@ <h4 id="_알림_내역_조회_http_response"><a class="link" href="#_알림_내
<div id="footer">
<div id="footer-text">
Version 0.0.1-SNAPSHOT<br>
Last updated 2024-08-15 17:38:37 +0900
Last updated 2024-09-29 21:29:45 +0900
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"></script>
Expand Down
Loading
Loading