Skip to content

Commit

Permalink
Merge pull request #525 from woowacourse-teams/develop
Browse files Browse the repository at this point in the history
[release] v0.1.1
  • Loading branch information
hyeonic authored Aug 19, 2022
2 parents a67eaf6 + 85d6729 commit 2bc291c
Show file tree
Hide file tree
Showing 362 changed files with 35,273 additions and 34 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug-template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug Template
about: 버그를 이슈에 등록한다.
title: ""
title: '이슈의 제목을 입력해주세요!'
labels: ''
assignees: ''
---
Expand All @@ -16,4 +16,3 @@ assignees: ''
## 📸 스크린샷

## 👄 참고 사항

3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature-template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature Template
about: 구현할 기능을 이슈에 등록한다.
title: ""
title: '이슈의 제목을 입력해주세요!'
labels: ''
assignees: ''
---
Expand All @@ -17,4 +17,3 @@ assignees: ''
## 📄 참고 사항

## ⏰ 예상 소요 기간

3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
- [ ] 🔀 PR 제목의 형식을 잘 작성했나요? e.g. `[feat] PR을 등록한다.`
- [ ] 💯 테스트는 잘 통과했나요?
- [ ] 🏗️ 빌드는 성공했나요?
- [ ] 🧹 불필요한 코드는 제거했나요?
- [ ] 💭 이슈는 등록했나요?
- [ ] 🏷️ 라벨은 등록했나요?
- [ ] 💻 git rebase를 사용했나요?
- [ ] 🌈 알록달록한가요?

## 작업 내용
Expand All @@ -12,4 +14,3 @@
## 주의사항

Closes #{이슈 번호}

39 changes: 39 additions & 0 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Backend CI

on:
pull_request:
branches:
- main
- develop
paths:
- backend/**
- .github/** # Github Actions 작업을 위한 포함

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./backend

steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "temurin"

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: ${{ always() }}
with:
files: build/test-results/**/*.xml
38 changes: 38 additions & 0 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Frontend CI

on:
pull_request:
branches:
- main
- develop
paths:
- frontend/**
- .github/** # Github Actions 작업을 위한 포함

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"

- name: Install node packages
run: npm install

- name: Check lint
run: npm run check-lint

- name: Check prettier
run: npm run check-prettier

- name: Build
run: npm run dev-build

- name: Component test
run: npm run test
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "backend/src/main/resources/config"]
path = backend/src/main/resources/config
url = https://github.com/dallog/config.git
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# 2022-dallog

## 알록달록🌈 팀원 소개

| Backend | Backend | Backend | Backend | Frontend | Frontend |
| :------------------------------------------: | :------------------------------------------------: | :----------------------------------------------: | :------------------------------------------: | :--------------------------------------------: | :-----------------------------------------: |
| ![](https://github.com/hyeonic.png?size=120) | ![](https://github.com/gudonghee2000.png?size=120) | ![](https://github.com/summerlunaa.png?size=120) | ![](https://github.com/devHudi.png?size=120) | ![](https://github.com/daaaayeah.png?size=120) | ![](https://github.com/jhy979.png?size=120) |
| [매트(최기현)](https://github.com/hyeonic) | [리버(구동희)](https://github.com/gudonghee2000) | [파랑(이하은)](https://github.com/summerlunaa) | [후디(조동현)](https://github.com/devHudi) | [티거(이다예)](https://github.com/daaaayeah) | [나인(장호영)](https://github.com/jhy979) |
6 changes: 6 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ out/

### VS Code ###
.vscode/

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

### logs ###
logs/
151 changes: 140 additions & 11 deletions backend/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,154 @@
plugins {
id 'org.springframework.boot' version '2.7.1'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'org.springframework.boot' version '2.7.1'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.asciidoctor.jvm.convert' version '3.3.2'
id 'org.sonarqube' version '3.3'
id 'java'
id 'jacoco'
}

group = 'com.allog'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'

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

configurations {
asciidoctorExtensions
}

repositories {
mavenCentral()
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'
runtimeOnly 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
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'

runtimeOnly 'mysql:mysql-connector-java'
runtimeOnly 'com.h2database:h2'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.rest-assured:rest-assured:4.4.0'

// JWT를 위한 의존성
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// Restdocs를 위한 의존성
asciidoctorExtensions 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'

// Sonarqube를 위한 의존성
implementation 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
}

test {
outputs.dir snippetsDir
useJUnitPlatform()
finalizedBy 'jacocoTestReport'
}

jacoco {
toolVersion = "0.8.8"
}

jacocoTestReport {
reports {
xml.enabled true
csv.enabled true
html.enabled true

xml.destination file("${buildDir}/jacoco/index.xml")
csv.destination file("${buildDir}/jacoco/index.csv")
html.destination file("${buildDir}/jacoco/index.html")
}

afterEvaluate {
classDirectories.setFrom(
files(classDirectories.files.collect {
fileTree(dir: it, excludes: [
'**/*Application*',
'**/*Exception*',
'**/dto/**',
'**/infrastructure/**',
'**/global/config/**',
'**/BaseEntity*',
'**/ControllerAdvice*',
'**/AuthorizationExtractor*'
])
})
)
}

finalizedBy 'jacocoTestCoverageVerification'
}

jacocoTestCoverageVerification {
violationRules {
rule {
enabled = true
element = "CLASS"

// 모든 클래스 각각 라인 커버리지 75% 만족시 빌드 성공
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.75
}

excludes = [
'*.*Application',
'*.*Exception',
'*.dto.*',
'*.infrastructure.*',
'*.global.config.*',
'*.BaseEntity',
'*.ControllerAdvice',
'*.AuthorizationExtractor'
]
}
}
}

sonarqube {
properties {
property 'sonar.projectKey', 'dallog'
property "sonar.sources", "src"
property "sonar.language", "java"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.profile", "Sonar way"
property "sonar.java.binaries", "${buildDir}/classes"
property "sonar.test.inclusions", "**/*Test.java"
property 'sonar.exclusions', '**/jacoco/**'
property 'sonar.coverage.exclusions', '**/test/**/*, **/*Application*, **/global/config/**, **/dto/**, **/*Exception*, **/infrastructure/**, **/BaseEntity*, **/ControllerAdvice*, **/AuthorizationExtractor*'
property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/jacoco/index.xml"
}
}

asciidoctor {
configurations 'asciidoctorExtensions'
baseDirFollowsSourceFile()
inputs.dir snippetsDir
dependsOn test
}

asciidoctor.doFirst {
delete file('src/main/resources/static/docs')
}

task copyDocument(type: Copy) {
dependsOn asciidoctor

from "${asciidoctor.outputDir}"
into file("src/main/resources/static/docs")
}

tasks.named('test') {
useJUnitPlatform()
bootJar {
dependsOn copyDocument
}
59 changes: 59 additions & 0 deletions backend/src/docs/asciidoc/auth.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
== Auth(인증)

=== OAuth 로그인 링크 생성

==== Request

include::{snippets}/auth/link/http-request.adoc[]

==== Path Parameters

include::{snippets}/auth/link/path-parameters.adoc[]

==== Request Parameters

include::{snippets}/auth/link/request-parameters.adoc[]

==== Response

include::{snippets}/auth/link/http-response.adoc[]

==== ResponseFields

include::{snippets}/auth/link/response-fields.adoc[]

=== OAuth 로그인

==== Request

include::{snippets}/auth/token/http-request.adoc[]

==== PathParameters

include::{snippets}/auth/token/path-parameters.adoc[]

==== RequestFields

include::{snippets}/auth/token/request-fields.adoc[]

==== Response

include::{snippets}/auth/token/http-response.adoc[]

=== OAuth 로그인 : Resource Server 에러

==== Request

include::{snippets}/auth/exception/token/http-request.adoc[]

==== PathParameters

include::{snippets}/auth/exception/token/path-parameters.adoc[]

==== RequestFields

include::{snippets}/auth/exception/token/request-fields.adoc[]

==== Response

include::{snippets}/auth/exception/token/http-response.adoc[]
Loading

0 comments on commit 2bc291c

Please sign in to comment.