Skip to content

Commit

Permalink
fix: update kover config
Browse files Browse the repository at this point in the history
  • Loading branch information
kaszabimre committed Oct 22, 2024
1 parent 2ad1b2e commit 1f10164
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

- name: Upload Kover Report
if: steps.kover_report.outputs.kover_report_available == 'true'
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v3.1.2
with:
name: ${{ steps.kover_report.outputs.artifacts_name }}
path: ${{ github.workspace }}/composeApp/build/reports/kover/reportDebug.xml
Expand Down
51 changes: 25 additions & 26 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,38 +84,37 @@ allprojects {
jvmTarget = libs.versions.javaTargetCompatibility.get()
}

if (koverIncludeList.any { project.name.contains(it) }) {
kover {
currentProject {
instrumentation {
excludedClasses.addAll(koverExcludeList)
}
sources {
excludeJava = true
}
kover {
currentProject {
instrumentation {
excludedClasses.addAll(koverExcludeList)
}
sources {
excludeJava = true
}
reports {
}
reports {
filters {
excludes { classes(koverExcludeList) }
includes { classes(koverIncludeList) }
}

total {
filters {
excludes { classes(koverExcludeList) }
includes { classes(koverIncludeList) }
}
verify {
rule("Minimum coverage verification error") {
disabled = false
groupBy = kotlinx.kover.gradle.plugin.dsl.GroupingEntityType.APPLICATION

total {
filters {
excludes { classes(koverExcludeList) }
includes { classes(koverIncludeList) }
}
verify {
rule("Minimum coverage verification error") {
disabled = false
groupBy = kotlinx.kover.gradle.plugin.dsl.GroupingEntityType.APPLICATION

bound {
minValue.set(defaultRequiredMinimumCoverage)
maxValue.set(defaultRequiredMaximumCoverage)
coverageUnits.set(CoverageUnit.LINE)
aggregationForGroup = kotlinx.kover.gradle.plugin.dsl.AggregationType.COVERED_PERCENTAGE
}
bound {
minValue.set(defaultRequiredMinimumCoverage)
maxValue.set(defaultRequiredMaximumCoverage)
coverageUnits.set(CoverageUnit.LINE)
aggregationForGroup =
kotlinx.kover.gradle.plugin.dsl.AggregationType.COVERED_PERCENTAGE
}
}
}
Expand Down

0 comments on commit 1f10164

Please sign in to comment.