From 0653d3735c2fc6f8593435a100f8675089f60f1d Mon Sep 17 00:00:00 2001 From: KIMSEI1124 Date: Mon, 14 Oct 2024 16:51:51 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Chore:=20Aws=20S3=20Client=20Jacoco=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/aws-s3-client/build.gradle | 58 ++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/client/aws-s3-client/build.gradle b/client/aws-s3-client/build.gradle index 2fa8d17..c16d8ff 100644 --- a/client/aws-s3-client/build.gradle +++ b/client/aws-s3-client/build.gradle @@ -12,4 +12,60 @@ dependencies { testImplementation('org.springframework.boot:spring-boot-starter-test') testImplementation('org.mockito:mockito-core') -} \ No newline at end of file +} + +/* Jacoco Start */ +tasks.withType(JacocoReport).configureEach { + reports { + html.required.set(true) + xml.required.set(true) + html.outputLocation.set(file("reports/jacoco/index.xml")) + xml.outputLocation.set(file("reports/jacoco/test/jacocoTestReport.xml")) + } + + classDirectories.setFrom( + files(classDirectories.files.collect { + fileTree(it) { + exclude( + "**/*Application*", + "**/*Configuration*", + "**/*Request*", + "**/*Response*", + "**/common/**", + "**/config/**", + "**/data/**", + "**/exception/**", + "**/properties/**" + ) + } + }) + ) +} + +tasks.jacocoTestCoverageVerification { + violationRules { + rule { + enabled = true + element = 'CLASS' + + limit { + counter = 'LINE' + value = 'COVEREDRATIO' + minimum = 0.80D + } + + excludes = [ + "**/*Application*", + "**/*Configuration*", + "**/*Request*", + "**/*Response*", + "**/common/**", + "**/config/**", + "**/data/**", + "**/exception/**", + "**/properties/**" + ] + } + } +} +/* Jacoco End */ \ No newline at end of file From e201063bd0b43428bc9779d2cb93e0d0adb70fd5 Mon Sep 17 00:00:00 2001 From: KIMSEI1124 Date: Mon, 14 Oct 2024 16:52:49 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Chore:=20Github=20Actions=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tion-image-server-test.yml => backend-server-test.yml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{application-image-server-test.yml => backend-server-test.yml} (75%) diff --git a/.github/workflows/application-image-server-test.yml b/.github/workflows/backend-server-test.yml similarity index 75% rename from .github/workflows/application-image-server-test.yml rename to .github/workflows/backend-server-test.yml index f924a49..89d1865 100644 --- a/.github/workflows/application-image-server-test.yml +++ b/.github/workflows/backend-server-test.yml @@ -1,4 +1,4 @@ -name: ๐Ÿงช Image Server Tests on Pull Request +name: ๐Ÿงช Backend Tests on Pull Request on: pull_request: @@ -27,14 +27,14 @@ jobs: run: chmod +x gradlew - name: ๐Ÿงช Spring Boot Test - run: ./gradlew clean application:wypl-image:test + run: ./gradlew clean test - name: Add coverage to PR id: jacoco uses: madrapps/jacoco-report@v1.6.1 with: - title: ๐Ÿ“„ Image Server Jacoco Coverage Report - paths: ${{ github.workspace }}/**/wypl-image/reports/jacoco/test/jacocoTestReport.xml + title: ๐Ÿ“„ Jacoco Coverage Report + paths: ${{ github.workspace }}/**/reports/jacoco/test/jacocoTestReport.xml token: ${{ secrets.GITHUB_TOKEN }} min-coverage-overall: 80 min-coverage-changed-files: 80 \ No newline at end of file From e27f29bcc06825556ddb08d557b31da5b2f3bb63 Mon Sep 17 00:00:00 2001 From: KIMSEI1124 Date: Mon, 14 Oct 2024 16:57:05 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Remove:=20=EC=82=AC=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20Actions=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application-core-server-test.yml | 27 ------------------- .../application-notification-server-test.yml | 27 ------------------- 2 files changed, 54 deletions(-) delete mode 100644 .github/workflows/application-core-server-test.yml delete mode 100644 .github/workflows/application-notification-server-test.yml diff --git a/.github/workflows/application-core-server-test.yml b/.github/workflows/application-core-server-test.yml deleted file mode 100644 index 85d8a03..0000000 --- a/.github/workflows/application-core-server-test.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ๐Ÿงช Calendar Server Tests on Pull Request - -on: - pull_request: - branches: - - main - - dev - -jobs: - project-test: - runs-on: ubuntu-latest - - steps: - - name: ๐Ÿ“ฆ Checkout repository - uses: actions/checkout@v4 - - - name: ๐Ÿ—๏ธ Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '17' - - - name: ๐ŸŽŸ๏ธ Grant execute permission for gradlew - run: chmod +x gradlew - - - name: ๐Ÿงช Spring Boot Test - run: ./gradlew clean application:wypl-core:test \ No newline at end of file diff --git a/.github/workflows/application-notification-server-test.yml b/.github/workflows/application-notification-server-test.yml deleted file mode 100644 index e606f1e..0000000 --- a/.github/workflows/application-notification-server-test.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ๐Ÿงช Notification Server Tests on Pull Request - -on: - pull_request: - branches: - - main - - dev - -jobs: - project-test: - runs-on: ubuntu-latest - - steps: - - name: ๐Ÿ“ฆ Checkout repository - uses: actions/checkout@v4 - - - name: ๐Ÿ—๏ธ Set up JDK 21 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '21' - - - name: ๐ŸŽŸ๏ธ Grant execute permission for gradlew - run: chmod +x gradlew - - - name: ๐Ÿงช Spring Boot Test - run: ./gradlew clean application:wypl-notification:test \ No newline at end of file