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 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 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