diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dde005df..2e6fdf43 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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/cache@v3.0.11 @@ -151,13 +158,6 @@ jobs: cp CHANGELOG.md docs mkdocs build --verbose --clean --strict - - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v3.1.1 - 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 @@ -194,4 +194,4 @@ jobs: --notes "$(cat << 'EOM' ${{ needs.build.outputs.changelog }} EOM - )" \ No newline at end of file + )" diff --git a/build.gradle.kts b/build.gradle.kts index 7de2eb81..4c741ede 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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") @@ -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") @@ -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 {