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

[Refactor/#439] V1 코드 정리 #440

Merged
merged 27 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c0545f8
refactor: github action 정리
belljun3395 Dec 4, 2024
70c7dd4
refactor: 설정 코드 분리 및 패키지 정리
belljun3395 Dec 4, 2024
6e1ae12
test: 아키텍처 테스트 추가
belljun3395 Dec 5, 2024
2a4730d
feat: dokka 문서화 추가
belljun3395 Dec 5, 2024
1612375
refactor: email 모듈에서 EmailTemplateProcessor를 통해 html을 만들도록 수정
belljun3395 Dec 12, 2024
2312108
refactor: email 모듈에서 mail 관련 의존성 api에서 implementation으로 수정
belljun3395 Dec 12, 2024
fc061d3
refactor: WebMvcTest로 ControllerTest 수행되도록 수정
belljun3395 Dec 12, 2024
b395632
refactor: testContainer 의존성 삭제
belljun3395 Dec 12, 2024
6294dae
refactor: test 의존성 분리
belljun3395 Dec 12, 2024
030e807
feat: test-fixtures plugin 추가
belljun3395 Dec 12, 2024
f0a4966
refactor: web testFixtures 분리 적용
belljun3395 Dec 12, 2024
780099a
fix: 잘못 사용된 예외 수정
belljun3395 Dec 12, 2024
4d605d3
refactor: api test 네이밍 통일
belljun3395 Dec 12, 2024
b6881a9
refactor: Description#authHeader 적용
belljun3395 Dec 12, 2024
e29f921
refactor: FieldDescription을 활용해 간단히 수정
belljun3395 Dec 12, 2024
9ed83d2
refactor: FieldDescription에 optional 반영
belljun3395 Dec 12, 2024
0518026
refactor: openapi3 swagger 만드는 task 전체가 공유할 수 있도록 수정
belljun3395 Dec 12, 2024
ac47873
refactor: 각 모듈에서 생성되는 swagger 조회할 수 있도록 수정
belljun3395 Dec 12, 2024
6650128
refactor: 라이브러리 코드 설정 통일
belljun3395 Dec 12, 2024
5a62ffe
feat: static 파일 gitignore에 추가
belljun3395 Dec 12, 2024
1dfb030
refactor: repo, flyway 정리
belljun3395 Dec 12, 2024
e6560cd
chore: 린트 정리
belljun3395 Dec 13, 2024
10f72e3
test: spec 테스트 삭제
belljun3395 Dec 13, 2024
c87847b
refactor: 의존성 정리 및 추가
belljun3395 Dec 13, 2024
a509981
chore: 사소한 수정
belljun3395 Dec 13, 2024
72d5375
fix: kapt 때문에 빌드 되지 않는 문제 해결
belljun3395 Dec 13, 2024
f1d62bd
fix: 테스트 수행되지 않는 문제 해결
belljun3395 Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Loading