Skip to content

Commit

Permalink
Merge pull request #526 from woowacourse-teams/develop
Browse files Browse the repository at this point in the history
Hang-Log Prod 1.0.0 Release
  • Loading branch information
mcodnjs authored Aug 31, 2023
2 parents bcb983c + 63c8b6e commit 349cd86
Show file tree
Hide file tree
Showing 550 changed files with 62,804 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,43 @@ labels: "\U0001F41E Bug"
body:
- type: textarea
attributes:
label: 🐞 Describe
label: 🐞 버그 설명
description: 버그에 대한 설명을 작성해 주세요.
placeholder: 자세히 적을수록 좋습니다!
validations:
required: true
- type: textarea
attributes:
label: 📄 Logs
label: ✅ 예상 결과
description: 예상한 결과를 작성해 주세요.
validations:
required: true
- type: textarea
attributes:
label: ❗ 실제 결과
description: 실제 결과를 작성해 주세요.
validations:
required: true
- type: textarea
attributes:
label: 💻 버그 시뮬레이션
description: 버그를 발견하게 된 상황을 단계별로 적어주세요.
validations:
required: true
- type: textarea
attributes:
label: 📄 로그
description: 로그가 있으면 복붙해 주세요.
render: shell
validations:
required: false
- type: textarea
attributes:
label: 🌏 Environment
label: 🌏 환경
description: 버그가 발생한 환경에 대해 작성해 주세요.
placeholder: |
OS: macOS 12.2.1
validations:
required: true
required: false
- type: textarea
attributes:
label: 🙋🏻 More
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/backend-CI-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Java CI with Gradle

on:
pull_request:
branches: [ main, develop ]

defaults:
run:
working-directory: backend

permissions:
contents: read

jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'BE')
runs-on: ubuntu-22.04
permissions:
pull-requests: write

steps:
- name: 레포지토리 체크아웃
uses: actions/checkout@v3
with:
token: ${{ secrets.SUBMODULE_TOKEN }}
submodules: true

- name: JDK 17을 설치합니다.
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'

- name: gradlew 권한을 부여합니다.
run: chmod +x gradlew

- name: Gradle을 통해 빌드합니다.
run: ./gradlew build

- name: jacocoTestCoverage를 실행하고 리포트를 출력합니다.
id: jacoco
uses: madrapps/[email protected]
with:
title: 📝 Jacoco Test Coverage
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
update-comment: true
48 changes: 48 additions & 0 deletions .github/workflows/frontend-e2e-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Cypress Tests
on:
pull_request:
branches:
- develop
paths:
- frontend/**
- .github/**

defaults:
run:
working-directory: frontend

jobs:
run-dev:
if: contains(github.event.pull_request.labels.*.name, 'FE')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Create env file
run: |
touch .env
echo GOOGLE_API_KEY=${{ secrets.GOOGLE_API_KEY }} >> .env
echo GOOGLE_MAP_ID=${{ secrets.GOOGLE_MAP_ID }} >> .env
echo PROD_BASE_URL=${{ secrets.PROD_BASE_URL }} >> .env
cat .env
- name: Cypress run
uses: cypress-io/github-action@v5
with:
browser: chrome
start: npm run dev
wait-on: 'http://localhost:3000'
record: false
working-directory: ./frontend
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Cypress test failure message
if: failure()
uses: thollander/actions-comment-pull-request@v1
with:
message: |
로컬 cypress 테스트가 실패했습니다. [테스트 결과 자세히 보기](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "backend/backend-submodule"]
path = backend/backend-submodule
url = https://github.com/HangLog/backend-submodule.git
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 hang-log

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 2023-hang-log


![Group 2695 (1)](https://github.com/woowacourse-teams/2023-hang-log/assets/77482065/cfddda8a-e416-4f03-bc53-edd6eb0c4595)


## 멤버

### 프론트엔드
Expand All @@ -14,3 +18,9 @@
|:-----------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------:|
| [이오](https://github.com/LJW25) | [디노](https://github.com/jjongwa) | [라온](https://github.com/mcodnjs) | [홍고](https://github.com/hgo641) | [달리](https://github.com/waterricecake) |


![‎README 인프라 구조 ‎008](https://github.com/woowacourse-teams/2023-hang-log/assets/77482065/eb0d792c-9699-4010-95b4-a29e5ab76687)

![‎README 인프라 구조 ‎007](https://github.com/woowacourse-teams/2023-hang-log/assets/77482065/e9e38e63-ad72-45cc-80f8-883ae68aa29e)

![‎README 인프라 구조 ‎001](https://github.com/woowacourse-teams/2023-hang-log/assets/77482065/1e73f647-7774-450e-863c-7dbc906f5e4d)
49 changes: 49 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

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

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

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

### VS Code ###
.vscode/

### docker ###
docker/

### RestDocs ###
src/main/resources/static/docs/

### Ignore .DS_Store ###
**/.DS_Store

### application*.yml ###
src/main/resources/*.yml
1 change: 1 addition & 0 deletions backend/backend-submodule
Submodule backend-submodule added at f87ceb
95 changes: 95 additions & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.1'
id 'io.spring.dependency-management' version '1.1.0'
id "org.asciidoctor.jvm.convert" version "3.3.2"
id 'jacoco'
}

group = 'hanglog'
version = '0.0.1-SNAPSHOT'

java {
sourceCompatibility = '17'
}

configurations {
asciidoctorExt
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0'
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'com.amazonaws:aws-java-sdk-s3:1.12.528'

testImplementation 'io.rest-assured:rest-assured:5.3.1'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'

compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java:8.0.28'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'

annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'
}

test {
finalizedBy jacocoTestReport
}

jacoco {
toolVersion = '0.8.8'
}

jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}

tasks.named('test') {
useJUnitPlatform()
}

asciidoctor {
dependsOn test
configurations 'asciidoctorExt'
}

tasks.register('copyApiDocument', Copy) {
dependsOn asciidoctor
doFirst {
delete file("src/main/resources/static/docs")
}
from asciidoctor.outputDir
into file("src/main/resources/static/docs")
}

processResources.dependsOn('copySecret')

tasks.register('copySecret', Copy) {
from './backend-submodule'
include 'application.yml'
into './src/main/resources'
}

build {
dependsOn copyApiDocument
}
18 changes: 18 additions & 0 deletions backend/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'
services:
mysql8:
image: mysql:8.0.28
platform: linux/x86_64
container_name: mysql8
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: hanglog
MYSQL_USER: user
MYSQL_PASSWORD: password
volumes:
- ./db/mysql/data:/var/lib/mysql
- ./db/mysql/config:/etc/mysql/conf.d
- ./db/mysql/init:/docker-entrypoint-initdb.d
Binary file added backend/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions backend/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 349cd86

Please sign in to comment.