Skip to content

Commit

Permalink
[Refactor/#439] V1 코드 정리 (#440)
Browse files Browse the repository at this point in the history
* refactor: github action 정리

* refactor: 설정 코드 분리 및 패키지 정리

* test: 아키텍처 테스트 추가

* feat: dokka 문서화 추가

* refactor: email 모듈에서 EmailTemplateProcessor를 통해 html을 만들도록 수정

* refactor: email 모듈에서 mail 관련 의존성 api에서 implementation으로 수정

* refactor: WebMvcTest로 ControllerTest 수행되도록 수정

* refactor: testContainer 의존성 삭제

* refactor: test 의존성 분리

* feat: test-fixtures plugin 추가

* refactor: web testFixtures 분리 적용

* fix: 잘못 사용된 예외 수정

* refactor: api test 네이밍 통일

* refactor: Description#authHeader 적용

* refactor: FieldDescription을 활용해 간단히 수정

* refactor: FieldDescription에 optional 반영

* refactor: openapi3 swagger 만드는 task 전체가 공유할 수 있도록 수정

* refactor: 각 모듈에서 생성되는 swagger 조회할 수 있도록 수정

* refactor: 라이브러리 코드 설정 통일

* feat: static 파일 gitignore에 추가

* refactor: repo, flyway 정리

* chore: 린트 정리

* test: spec 테스트 삭제

* refactor: 의존성 정리 및 추가

* chore: 사소한 수정

* fix: kapt 때문에 빌드 되지 않는 문제 해결

* fix: 테스트 수행되지 않는 문제 해결
  • Loading branch information
belljun3395 authored Dec 13, 2024
1 parent 01bbabd commit 31d6e94
Show file tree
Hide file tree
Showing 522 changed files with 3,400 additions and 6,094 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:
- name: Generate OpenAPI3
run: |
./gradlew api:openapi3 -PserverUrl=https://api.fewletter.site
./gradlew openapi3 -PserverUrl=https://api.fewletter.site
- name: Generate Swagger
run: |
./gradlew api:generateStaticSwaggerUIApi
./gradlew generateStaticSwaggerUI
- name : Docker Login
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and Publish Dokka Documentation

on:
pull_request:
branches: [ "main", "dev" ]
workflow_dispatch:

permissions: write-all

jobs:
dokka:
runs-on: ubuntu-latest
steps:
# 1. Checkout the code
- uses: actions/checkout@v4

# 2. Set up JDK
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

# 3. Run dokkaHtmlMultiModule
- name: Generate Dokka Documentation
run: ./gradlew dokkaHtmlMultiModule

# 4. Checkout gh-pages branch to publish documentation
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages # Use the `gh-pages` branch
path: gh-pages # Specify the path where `gh-pages` branch will be checked out

# 5. Copy generated documentation to gh-pages directory
- name: Copy Dokka Documentation
run: |
rm -rf gh-pages/* # Clear existing files
cp -R build/dokka/htmlMultiModule/* gh-pages/ # Copy the newly generated documentation
# 6. Publish documentation to GitHub Pages
- name: Publish Documentation
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: gh-pages
4 changes: 2 additions & 2 deletions .github/workflows/ecs-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ jobs:
- name: Generate OpenAPI3
run: |
./gradlew api:openapi3 -PserverUrl=https://api.fewletter.site
./gradlew openapi3 -PserverUrl=https://api.fewletter.site
- name: Generate Swagger
run: |
./gradlew api:generateStaticSwaggerUIApi
./gradlew generateStaticSwaggerUI
- name: Build with Gradle bootBuildImage, tag, and push image to Amazon ECR
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ecs-dev-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ jobs:
- name: Generate OpenAPI3
run: |
./gradlew api:openapi3 -PserverUrl=https://api.fewletter.shop
./gradlew openapi3 -PserverUrl=https://api.fewletter.shop
- name: Generate Swagger
run: |
./gradlew api:generateStaticSwaggerUIApi
./gradlew generateStaticSwaggerUI
- name: Build with Gradle bootBuildImage, tag, and push image to Amazon ECR
env:
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/gpt_code_review.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/sql-explain-hook.yml

This file was deleted.

126 changes: 3 additions & 123 deletions .github/workflows/validate-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,6 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Jooq Code Generation
run: |
./gradlew jooqCodegenAll
- name: Cache Api Repo Jooq
uses: actions/cache@v3
with:
path: |
./api-repo/src/generated
./api-repo/src/main/resources/db/migration
key: ${{ runner.os }}-api-repo-jooq-${{ hashFiles('./api-repo/src/generated/**', './api-repo/src/main/resources/db/migration/**') }}
restore-keys: |
${{ runner.os }}-api-repo-jooq-
- name: Cache Batch Jooq
uses: actions/cache@v3
with:
path: |
./batch/src/generated
./batch/src/main/resources/db/migration
key: ${{ runner.os }}-batch-jooq-${{ hashFiles('./batch/src/generated/**', './batch/src/main/resources/db/migration/**') }}
restore-keys: |
${{ runner.os }}-batch-jooq-
api-test:
needs: setup-test
runs-on: ubuntu-latest
Expand All @@ -67,106 +43,10 @@ jobs:
java-version: '17'
distribution: 'temurin'

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Api Repo Jooq
uses: actions/cache@v3
with:
path: |
./api-repo/src/generated
./api-repo/src/main/resources/db/migration
key: ${{ runner.os }}-api-repo-jooq-${{ hashFiles('./api-repo/src/generated/**', './api-repo/src/main/resources/db/migration/**') }}
restore-keys: |
${{ runner.os }}-api-repo-jooq-
- name: Cache Batch Jooq
uses: actions/cache@v3
with:
path: |
./batch/src/generated
./batch/src/main/resources/db/migration
key: ${{ runner.os }}-batch-jooq-${{ hashFiles('./batch/src/generated/**', './batch/src/main/resources/db/migration/**') }}
restore-keys: |
${{ runner.os }}-batch-jooq-
- name: Jooq Code Generation
run: |
./gradlew jooqCodegenAll
- name: API Test with Gradle
run: |
./gradlew api:test
api-repo-test:
needs: setup-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-jooq-${{ hashFiles('./api-repo/src/generated/**', './api-repo/src/main/resources/db/migration/**', './batch/src/generated/**', './batch/src/main/resources/db/migration/**') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Api Repo Jooq
uses: actions/cache@v3
with:
path: |
./api-repo/src/generated
./api-repo/src/main/resources/db/migration
key: ${{ runner.os }}-api-repo-jooq-${{ hashFiles('./api-repo/src/generated/**', './api-repo/src/main/resources/db/migration/**') }}
restore-keys: |
${{ runner.os }}-api-repo-jooq-
- name: API Repo Test with Gradle
run: |
./gradlew api-repo:test
batch-test:
needs: setup-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Batch Jooq
uses: actions/cache@v3
with:
path: |
./batch/src/generated
./batch/src/main/resources/db/migration
key: ${{ runner.os }}-batch-jooq-${{ hashFiles('./batch/src/generated/**', './batch/src/main/resources/db/migration/**') }}
restore-keys: |
${{ runner.os }}-batch-jooq-
- name: Batch Test with Gradle
run: |
./gradlew batch:test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@ storage/**/*.sql

# DB explain result files
**/resources/explain/

# static
**/resources/static/
43 changes: 0 additions & 43 deletions api-repo/build.gradle.kts

This file was deleted.

16 changes: 0 additions & 16 deletions api-repo/src/main/kotlin/com/few/api/repo/config/ApiRepoConfig.kt

This file was deleted.

Loading

0 comments on commit 31d6e94

Please sign in to comment.