From 610ecd121a7a119b3383f467679e7b7bc9e6fa8f Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 18 May 2024 16:18:54 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20kover=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/pull-request-merge-check.yml | 2 +- hideout-core/build.gradle.kts | 57 ++++++++++--------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/.github/workflows/pull-request-merge-check.yml b/.github/workflows/pull-request-merge-check.yml index 2866ffbf..a6973ead 100644 --- a/.github/workflows/pull-request-merge-check.yml +++ b/.github/workflows/pull-request-merge-check.yml @@ -244,7 +244,7 @@ jobs: uses: madrapps/jacoco-report@v1.6.1 with: paths: | - ${{ github.workspace }}/build/reports/kover/report.xml + ${{ github.workspace }}/hideout-core/build/reports/kover/report.xml token: ${{ secrets.GITHUB_TOKEN }} title: Code Coverage update-comment: true diff --git a/hideout-core/build.gradle.kts b/hideout-core/build.gradle.kts index 16c35e50..956c4c4f 100644 --- a/hideout-core/build.gradle.kts +++ b/hideout-core/build.gradle.kts @@ -31,12 +31,12 @@ version = "0.0.1" sourceSets { create("intTest") { - compileClasspath += sourceSets.main.get().output - runtimeClasspath += sourceSets.main.get().output + compileClasspath += sourceSets.main.get().output + runtimeClasspath += sourceSets.main.get().output } create("e2eTest") { - compileClasspath += sourceSets.main.get().output - runtimeClasspath += sourceSets.main.get().output + compileClasspath += sourceSets.main.get().output + runtimeClasspath += sourceSets.main.get().output } } @@ -304,29 +304,34 @@ project.gradle.taskGraph.whenReady { } kover { - excludeSourceSets { - names("aot", "e2eTest", "intTest") - } -} + currentProject { + sources { + excludedSourceSets.addAll( + "aot", "e2eTest", "intTest" + ) -koverReport { - filters { - excludes { - packages( - "dev.usbharu.hideout.activitypub.domain.exception", - "dev.usbharu.hideout.core.domain.exception", - "dev.usbharu.hideout.core.domain.exception.media", - "dev.usbharu.hideout.core.domain.exception.resource", - "dev.usbharu.hideout.core.domain.exception.resource.local" - ) - annotatedBy("org.springframework.context.annotation.Configuration") - annotatedBy("org.springframework.boot.context.properties.ConfigurationProperties") - packages( - "dev.usbharu.hideout.controller.mastodon.generated", - "dev.usbharu.hideout.domain.mastodon.model.generated" - ) - packages("org.springframework") - packages("org.jetbrains") + } + } + + reports { + filters { + excludes { + packages( + "dev.usbharu.hideout.activitypub.domain.exception", + "dev.usbharu.hideout.core.domain.exception", + "dev.usbharu.hideout.core.domain.exception.media", + "dev.usbharu.hideout.core.domain.exception.resource", + "dev.usbharu.hideout.core.domain.exception.resource.local" + ) + annotatedBy("org.springframework.context.annotation.Configuration") + annotatedBy("org.springframework.boot.context.properties.ConfigurationProperties") + packages( + "dev.usbharu.hideout.controller.mastodon.generated", + "dev.usbharu.hideout.domain.mastodon.model.generated" + ) + packages("org.springframework") + packages("org.jetbrains") + } } } }