Skip to content

Commit

Permalink
Merge pull request #547 from KotlinIsland/adopt-kover
Browse files Browse the repository at this point in the history
Switch from jacoco to kotlinx-Kover
  • Loading branch information
koxudaxi authored Oct 17, 2022
2 parents 78796cb + 35cccbf commit 2bb48eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
# Run tests
- name: Run Tests
run: ./gradlew test jacocoTestReport --info
run: ./gradlew check

# Collect Tests Result of failed tests
- name: Collect Tests Result
Expand All @@ -96,6 +96,13 @@ jobs:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Upload Kover report to CodeCov
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v3
with:
files: ${{ github.workspace }}/build/reports/kover/xml/report.xml
fail_ci_if_error: true

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/[email protected]
Expand Down Expand Up @@ -151,13 +158,6 @@ jobs:
cp CHANGELOG.md docs
mkdocs build --verbose --clean --strict
- name: Upload Coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./build/reports/jacoco/test/jacocoTestReport.xml
flags: unittests
fail_ci_if_error: true
# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
Expand Down Expand Up @@ -194,4 +194,4 @@ jobs:
--notes "$(cat << 'EOM'
${{ needs.build.outputs.changelog }}
EOM
)"
)"
15 changes: 7 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ plugins {
id("org.jetbrains.changelog") version "1.3.1"
// Gradle Qodana Plugin
id("org.jetbrains.qodana") version "0.1.13"
jacoco
// Gradle Kover Plugin
id("org.jetbrains.kotlinx.kover") version "0.6.0"
}

group = properties("pluginGroup")
Expand Down Expand Up @@ -53,6 +54,11 @@ qodana {
showReport.set(System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false)
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
kover.xmlReport {
onCheck.set(true)
}

tasks {
wrapper {
gradleVersion = properties("gradleVersion")
Expand Down Expand Up @@ -84,13 +90,6 @@ tasks {
})
}

jacocoTestReport {
reports {
xml.required.set(true)
html.required.set(true)
}
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
Expand Down

0 comments on commit 2bb48eb

Please sign in to comment.