From 2c5b22864c6fcdf996f32027795dac68fdac4ee2 Mon Sep 17 00:00:00 2001
From: JiWoo
Date: Tue, 16 Jan 2024 17:21:01 +0900
Subject: [PATCH] [Feat] Bulk insert (#115)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* test: 스레딩을 사용한 공지 업데이트 테스트 작성
* feat(Notice): updatedDate와 important 필드 getter 제공
* feat(NoticeJdbcRepository): Batch insert를 위한 NoticeJdbcRepository 구현
* build: Gibhub Action WolkFlow 에 테스트 검증 step 추가
* test(DepartmentNoticeUpdaterTest): 대기 시간을 2초로 변경
* build: Java11 에서 17로 버전 변경
11버전에서 17버전으로 변경한다
* build: Gradle 버전을 7.3으로 변경
* build: Asciidoctor 버전 변경
* test: public 서식 지정자 제거
* docs(readme): Batch Insert 부분 업데이트
---
.github/workflows/build.yml | 17 +-
.github/workflows/dev.yml | 6 +-
README.md | 63 ++++-
build.gradle | 7 +-
gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 59203 bytes
gradle/wrapper/gradle-wrapper.properties | 2 +-
gradlew | 257 +++++++-----------
.../kustacks/kuring/notice/domain/Notice.java | 4 +
.../notice/domain/NoticeJdbcRepository.java | 64 +++++
.../update/notice/CategoryNoticeUpdater.java | 12 +-
.../notice/DepartmentNoticeUpdater.java | 9 +-
src/main/resources/application.yml | 2 +
.../update/CategoryNoticeUpdaterTest.java | 105 +++++++
.../update/DepartmentNoticeUpdaterTest.java | 88 ++++++
src/test/resources/application-test.yml | 49 ++++
src/test/resources/application.yml | 46 +---
system.properties | 2 +-
17 files changed, 507 insertions(+), 226 deletions(-)
create mode 100644 src/main/java/com/kustacks/kuring/notice/domain/NoticeJdbcRepository.java
create mode 100644 src/test/java/com/kustacks/kuring/worker/update/CategoryNoticeUpdaterTest.java
create mode 100644 src/test/java/com/kustacks/kuring/worker/update/DepartmentNoticeUpdaterTest.java
create mode 100644 src/test/resources/application-test.yml
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ca5bdcf4..543d78aa 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -37,11 +37,11 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- - name: Set up JDK 11
+ - name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin' # Alternative distribution options are available
- java-version: 11
+ java-version: 17
- name: Decrypt Secrets
run: sh .github/workflows/decrypt.sh
@@ -65,3 +65,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonarqube --info
+
+ - name: comments test result on PR
+ uses: EnricoMi/publish-unit-test-result-action@v1
+ if: always()
+ with:
+ files: '**/build/test-results/test/TEST-*.xml'
+
+ - name: comments test result in failed line if test failed
+ uses: mikepenz/action-junit-report@v3
+ if: always()
+ with:
+ report_paths: '**/build/test-results/test/TEST-*.xml'
+ token: ${{ github.token }}
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index 8c2a7b25..fbf66c97 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -44,12 +44,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- # (2) JDK 11 세팅
- - name: Set up JDK 11
+ # (2) JDK 17 세팅
+ - name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
- java-version: '11'
+ java-version: '17'
# (3) firebase secret decrypt
- name: Decrypt Secrets
diff --git a/README.md b/README.md
index 560e9874..bcda2702 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,13 @@
+
+ [](https://hits.seeyoufarm.com)
+
+
+