From 5569d1b1724c16fe0fb5c01d42e4c6c848d5b09b Mon Sep 17 00:00:00 2001 From: MarkMarkyMarkus Date: Sun, 7 Aug 2022 23:21:04 +0300 Subject: [PATCH 01/19] Setup Kover as test coverage tool Signed-off-by: MarkMarkyMarkus --- arrow-libs/gradle/test-coverage.gradle | 2 ++ build.gradle.kts | 19 +++++++++++++++++++ gradle/libs.versions.toml | 2 ++ 3 files changed, 23 insertions(+) diff --git a/arrow-libs/gradle/test-coverage.gradle b/arrow-libs/gradle/test-coverage.gradle index 59253bc3768..7373143b7b8 100644 --- a/arrow-libs/gradle/test-coverage.gradle +++ b/arrow-libs/gradle/test-coverage.gradle @@ -30,3 +30,5 @@ // dependsOn test // tests are required to run before generating the report // mustRunAfter test //} + +apply plugin: 'kover' diff --git a/build.gradle.kts b/build.gradle.kts index 9ca42d91ed3..3420645f845 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,6 +21,7 @@ plugins { alias(libs.plugins.dokka) alias(libs.plugins.animalSniffer) apply false alias(libs.plugins.kotest.multiplatform) apply false + alias(libs.plugins.kotlinx.kover) alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.kotlin.binaryCompatibilityValidator) alias(libs.plugins.arrowGradleConfig.nexus) @@ -42,6 +43,24 @@ configure { } } +koverMerged { + enable() + filters { + projects { + excludes.addAll( + listOf( + ":arrow-annotations", + ":arrow-core-test", + ":arrow-fx-coroutines-test", + ":arrow-optics-test", + ":arrow-site", + ":arrow-stack" + ) + ) + } + } +} + allprojects { group = property("projects.group").toString() } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cbc7e980f93..d62a8143aa6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,6 +10,7 @@ jUnitJupiter = "5.8.2" jUnitVintage = "5.8.2" kotest = "5.3.1" kotestGradle = "5.3.1" +koverGradle = "0.6.0-Beta" kotlin = "1.6.21" kotlinBinaryCompatibilityValidator = "0.10.1" kotlinCompileTesting = "1.4.8" @@ -63,5 +64,6 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlin-binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBinaryCompatibilityValidator" } kotlinx-knit = { id = "org.jetbrains.kotlinx.knit", version.ref = "knit" } +kotlinx-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "koverGradle" } kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "kspVersion" } From 0d6b36ebe3724499e14040fd0e572072f861b607 Mon Sep 17 00:00:00 2001 From: MarkMarkyMarkus Date: Sat, 20 Aug 2022 23:52:29 +0300 Subject: [PATCH 02/19] Add code coverage step to GitHub Actions Signed-off-by: MarkMarkyMarkus --- .github/workflows/pull_request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 06972248235..b94af000b95 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -37,6 +37,9 @@ jobs: with: arguments: --full-stacktrace mingwX64Test + - name: Create code coverage report + run: ./gradlew koverMergedReport + - name: Upload reports uses: actions/upload-artifact@v3.1.0 with: From b6b666cd46c7b800219ef72197cc5d807ad68b5a Mon Sep 17 00:00:00 2001 From: MarkMarkyMarkus Date: Tue, 30 Aug 2022 16:49:32 +0300 Subject: [PATCH 03/19] Update Kover version Signed-off-by: MarkMarkyMarkus --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 68933188e2e..a33ad20a179 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ jUnitJupiter = "5.8.2" jUnitVintage = "5.8.2" kotest = "5.3.1" kotestGradle = "5.3.1" -koverGradle = "0.6.0-Beta" +kover = "0.6.0" kotlin = "1.6.21" kotlinBinaryCompatibilityValidator = "0.11.0" kotlinCompileTesting = "1.4.8" @@ -64,6 +64,6 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlin-binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBinaryCompatibilityValidator" } kotlinx-knit = { id = "org.jetbrains.kotlinx.knit", version.ref = "knit" } -kotlinx-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "koverGradle" } +kotlinx-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "kspVersion" } From a750cd1634f2e27642a013f4fe0b57bd864e3494 Mon Sep 17 00:00:00 2001 From: MarkMarkyMarkus Date: Tue, 30 Aug 2022 17:02:31 +0300 Subject: [PATCH 04/19] Add CodeCov action --- .github/workflows/pull_request.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index b94af000b95..e02951744c5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -38,8 +38,15 @@ jobs: arguments: --full-stacktrace mingwX64Test - name: Create code coverage report + if: matrix.os == 'ubuntu-latest' run: ./gradlew koverMergedReport + - name: Upload coverage report (CodeCov) + uses: codecov/codecov-action@v3.1.0 + if: matrix.os == 'ubuntu-latest' + with: + files: build/reports/kover/merged/xml/report.xml + - name: Upload reports uses: actions/upload-artifact@v3.1.0 with: From 63025c08de252e262d1ba80a926cc59940a03154 Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 16:50:33 +0200 Subject: [PATCH 05/19] Try Jacoco action --- .github/workflows/pull_request.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e02951744c5..b22d67d7159 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -41,11 +41,12 @@ jobs: if: matrix.os == 'ubuntu-latest' run: ./gradlew koverMergedReport - - name: Upload coverage report (CodeCov) - uses: codecov/codecov-action@v3.1.0 - if: matrix.os == 'ubuntu-latest' + - name: Add coverage to PR + id: jacoco + uses: madrapps/jacoco-report@v1.2 with: - files: build/reports/kover/merged/xml/report.xml + paths: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml + token: ${{ secrets.GITHUB_TOKEN }} - name: Upload reports uses: actions/upload-artifact@v3.1.0 From 2aa06bf203c36cd97d4171c1225c7733f9fe947e Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 17:04:14 +0200 Subject: [PATCH 06/19] JaCoCo action only on Ubuntu --- .github/workflows/pull_request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index b22d67d7159..3391c4a0ec6 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -44,6 +44,7 @@ jobs: - name: Add coverage to PR id: jacoco uses: madrapps/jacoco-report@v1.2 + if: matrix.os == 'ubuntu-latest' with: paths: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml token: ${{ secrets.GITHUB_TOKEN }} From 7178103c7da9926a4fe4de69344c71e7934873bd Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 17:33:03 +0200 Subject: [PATCH 07/19] Use another action --- .github/workflows/pull_request.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3391c4a0ec6..fabecc78703 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -41,13 +41,17 @@ jobs: if: matrix.os == 'ubuntu-latest' run: ./gradlew koverMergedReport - - name: Add coverage to PR - id: jacoco - uses: madrapps/jacoco-report@v1.2 + - name: Add coverage report to PR + id: kover if: matrix.os == 'ubuntu-latest' + uses: mi-kas/kover-report@v1 with: - paths: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml + path: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml token: ${{ secrets.GITHUB_TOKEN }} + title: Code Coverage + update-comment: true + min-coverage-overall: 80 + min-coverage-changed-files: 80 - name: Upload reports uses: actions/upload-artifact@v3.1.0 From 7b9bc0d1acd297e89e90690feaa9a0d086ee2f1d Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 17:33:43 +0200 Subject: [PATCH 08/19] Better options for Kover action --- .github/workflows/pull_request.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index fabecc78703..bed708c1164 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -48,10 +48,8 @@ jobs: with: path: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml token: ${{ secrets.GITHUB_TOKEN }} - title: Code Coverage + title: Kover Report update-comment: true - min-coverage-overall: 80 - min-coverage-changed-files: 80 - name: Upload reports uses: actions/upload-artifact@v3.1.0 From 3ac0502099aa6bc3e3d093f2b0b2d540cd820cd1 Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 18:05:54 +0200 Subject: [PATCH 09/19] Allow writing in PRs --- .github/workflows/pull_request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index bed708c1164..53493c78eb0 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -9,6 +9,9 @@ jobs: build: runs-on: ${{ matrix.os }} + permissions: + pull-requests: write + strategy: matrix: os: [ 'macos-latest', 'ubuntu-latest', 'windows-latest' ] From e4b8666473be189f247918017265fc4237039148 Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 19:18:13 +0200 Subject: [PATCH 10/19] Try again --- .github/workflows/pull_request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 53493c78eb0..23c2ca6c44d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,6 +11,7 @@ jobs: permissions: pull-requests: write + issues: write strategy: matrix: From 7875e4f67df0294e485127cf171e2212703bfda6 Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 19:31:23 +0200 Subject: [PATCH 11/19] Move Kover to its own workflow --- .github/workflows/kover.yml | 51 ++++++++++++++++++++++++++++++ .github/workflows/pull_request.yml | 18 ----------- 2 files changed, 51 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/kover.yml diff --git a/.github/workflows/kover.yml b/.github/workflows/kover.yml new file mode 100644 index 00000000000..edb0194e507 --- /dev/null +++ b/.github/workflows/kover.yml @@ -0,0 +1,51 @@ +name: "kover" + +on: + pull_request_target: + paths: + - '**.kt' + +env: + GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ 'ubuntu-latest' ] + + steps: + - name: Checkout + uses: actions/checkout@v3.0.2 + with: + fetch-depth: 0 + + - name: Set up Java + uses: actions/setup-java@v3.4.0 + with: + distribution: 'zulu' + java-version: 11 + + - name: Create code coverage report + if: matrix.os == 'ubuntu-latest' + run: ./gradlew koverMergedReport + + - name: Add coverage report to PR + id: kover + uses: mi-kas/kover-report@v1 + with: + path: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml + token: ${{ secrets.GITHUB_TOKEN }} + title: Kover Report + update-comment: true + + - name: Upload reports + uses: actions/upload-artifact@v3.1.0 + with: + name: 'kover-${{ matrix.os }}' + path: '**/build/reports/**' + + - name: Stop Gradle daemons + run: ./gradlew --stop \ No newline at end of file diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 23c2ca6c44d..06972248235 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -9,10 +9,6 @@ jobs: build: runs-on: ${{ matrix.os }} - permissions: - pull-requests: write - issues: write - strategy: matrix: os: [ 'macos-latest', 'ubuntu-latest', 'windows-latest' ] @@ -41,20 +37,6 @@ jobs: with: arguments: --full-stacktrace mingwX64Test - - name: Create code coverage report - if: matrix.os == 'ubuntu-latest' - run: ./gradlew koverMergedReport - - - name: Add coverage report to PR - id: kover - if: matrix.os == 'ubuntu-latest' - uses: mi-kas/kover-report@v1 - with: - path: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml - token: ${{ secrets.GITHUB_TOKEN }} - title: Kover Report - update-comment: true - - name: Upload reports uses: actions/upload-artifact@v3.1.0 with: From 9471640fb09c33548acc3acd2709e8f2c3295674 Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 19:33:06 +0200 Subject: [PATCH 12/19] Fix one .kt file --- .../core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt index 7530906e9c2..200554c82f8 100644 --- a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt +++ b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt @@ -1,7 +1,8 @@ package arrow.core /** - * The monoid of endomorphisms under composition. + * The monoid of endomorphisms under composition, + * that is, functions which share input and output type. */ public data class Endo(val f: (A) -> A) { From 5275ea838a08dbc29d29c408eca809ee8bd3032c Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 19:34:41 +0200 Subject: [PATCH 13/19] Name of workflow --- .github/workflows/kover.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kover.yml b/.github/workflows/kover.yml index edb0194e507..d6ea6cd1740 100644 --- a/.github/workflows/kover.yml +++ b/.github/workflows/kover.yml @@ -9,7 +9,7 @@ env: GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" jobs: - build: + kover: runs-on: ${{ matrix.os }} strategy: From c5db551366305ff91ea144334714e272244f5266 Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 19:53:45 +0200 Subject: [PATCH 14/19] Update Endo.kt --- .../core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt index 200554c82f8..17e625f6182 100644 --- a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt +++ b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt @@ -3,6 +3,7 @@ package arrow.core /** * The monoid of endomorphisms under composition, * that is, functions which share input and output type. + * For example, `Endo` represents functions `(Int) -> Int`. */ public data class Endo(val f: (A) -> A) { From b3a3550089f48e85268fcc9b8415d55179c2951b Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Wed, 31 Aug 2022 20:12:41 +0200 Subject: [PATCH 15/19] Try once more --- .github/workflows/kover.yml | 51 ------------------- .github/workflows/pull_request.yml | 13 +++++ .../src/commonMain/kotlin/arrow/core/Endo.kt | 4 +- 3 files changed, 14 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/kover.yml diff --git a/.github/workflows/kover.yml b/.github/workflows/kover.yml deleted file mode 100644 index d6ea6cd1740..00000000000 --- a/.github/workflows/kover.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: "kover" - -on: - pull_request_target: - paths: - - '**.kt' - -env: - GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" - -jobs: - kover: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ 'ubuntu-latest' ] - - steps: - - name: Checkout - uses: actions/checkout@v3.0.2 - with: - fetch-depth: 0 - - - name: Set up Java - uses: actions/setup-java@v3.4.0 - with: - distribution: 'zulu' - java-version: 11 - - - name: Create code coverage report - if: matrix.os == 'ubuntu-latest' - run: ./gradlew koverMergedReport - - - name: Add coverage report to PR - id: kover - uses: mi-kas/kover-report@v1 - with: - path: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml - token: ${{ secrets.GITHUB_TOKEN }} - title: Kover Report - update-comment: true - - - name: Upload reports - uses: actions/upload-artifact@v3.1.0 - with: - name: 'kover-${{ matrix.os }}' - path: '**/build/reports/**' - - - name: Stop Gradle daemons - run: ./gradlew --stop \ No newline at end of file diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 06972248235..4848b18c3a5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -37,6 +37,19 @@ jobs: with: arguments: --full-stacktrace mingwX64Test + - name: Create code coverage report + if: matrix.os == 'ubuntu-latest' + run: ./gradlew koverMergedReport + + - name: Add coverage report to PR + id: kover + if: matrix.os == 'ubuntu-latest' + uses: mi-kas/kover-report@v1 + with: + path: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml + title: Kover Report + update-comment: true + - name: Upload reports uses: actions/upload-artifact@v3.1.0 with: diff --git a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt index 17e625f6182..7530906e9c2 100644 --- a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt +++ b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Endo.kt @@ -1,9 +1,7 @@ package arrow.core /** - * The monoid of endomorphisms under composition, - * that is, functions which share input and output type. - * For example, `Endo` represents functions `(Int) -> Int`. + * The monoid of endomorphisms under composition. */ public data class Endo(val f: (A) -> A) { From 50861a9e108b159bb6406e64b7bc0c2f64fc728f Mon Sep 17 00:00:00 2001 From: MarkMarkyMarkus Date: Wed, 31 Aug 2022 21:55:03 +0300 Subject: [PATCH 16/19] Test with token property --- .github/workflows/pull_request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4848b18c3a5..fc763fec025 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -46,7 +46,8 @@ jobs: if: matrix.os == 'ubuntu-latest' uses: mi-kas/kover-report@v1 with: - path: ${{ github.workspace }}/build/reports/kover/merged/xml/report.xml + path: build/reports/kover/merged/xml/report.xml + token: ${{ secrets.GITHUB_TOKEN }} title: Kover Report update-comment: true From e7d0f30ad1f6744f49b26a47f5e76cc2cbccc890 Mon Sep 17 00:00:00 2001 From: MarkMarkyMarkus Date: Thu, 1 Sep 2022 19:20:31 +0300 Subject: [PATCH 17/19] Test with reduced heap size --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index fc763fec025..947e7c904c5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -3,7 +3,7 @@ name: "pull_request" on: pull_request env: - GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx5g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" + GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.jvmargs="-Xmx2g -XX:MaxMetaspaceSize=1g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" jobs: build: From 2388fad1557ea8e91365465f81299b1ace6489e4 Mon Sep 17 00:00:00 2001 From: Simon Vergauwen Date: Fri, 9 Dec 2022 15:16:34 +0100 Subject: [PATCH 18/19] Move kover steps to ubuntu runner --- .github/workflows/pull_request.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d83ca018e33..a252c32dbcf 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -83,20 +83,6 @@ jobs: with: arguments: mingwX64Test - - name: Create code coverage report - if: matrix.os == 'ubuntu-latest' - run: ./gradlew koverMergedReport - - - name: Add coverage report to PR - id: kover - if: matrix.os == 'ubuntu-latest' - uses: mi-kas/kover-report@v1 - with: - path: build/reports/kover/merged/xml/report.xml - token: ${{ secrets.GITHUB_TOKEN }} - title: Kover Report - update-comment: true - - name: Upload reports if: failure() uses: actions/upload-artifact@v3 @@ -134,6 +120,20 @@ jobs: with: arguments: check + - name: Create code coverage report + uses: gradle/gradle-build-action@v2 + with: + arguments: koverMergedReport + + - name: Add coverage report to PR + id: kover + uses: mi-kas/kover-report@v1 + with: + path: build/reports/kover/merged/xml/report.xml + token: ${{ secrets.GITHUB_TOKEN }} + title: Kover Report + update-comment: true + - name: Upload reports if: failure() uses: actions/upload-artifact@v3 From 1c77ecbdc2ebb2b896641721f6b2cc1393e89c79 Mon Sep 17 00:00:00 2001 From: Simon Vergauwen Date: Fri, 9 Dec 2022 17:38:17 +0100 Subject: [PATCH 19/19] Only run kover if not from a fork --- .github/workflows/pull_request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a252c32dbcf..dd13d6cf492 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -121,11 +121,13 @@ jobs: arguments: check - name: Create code coverage report + if: "! github.event.pull_request.head.repo.fork " uses: gradle/gradle-build-action@v2 with: arguments: koverMergedReport - name: Add coverage report to PR + if: "! github.event.pull_request.head.repo.fork " id: kover uses: mi-kas/kover-report@v1 with: