Skip to content

Commit

Permalink
test: adds kover to github actions (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
amagyar-iohk authored Jul 27, 2023
1 parent ee9757d commit 7a65022
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,28 @@ jobs:
run: ./gradlew ktlintCheck

- name: Build Check All tests
run: |
./gradlew build check allTests --stacktrace
run: ./gradlew build check allTests --stacktrace

- name: Generate kover coverage report
run: ./gradlew koverHtmlReport koverXmlReport

- name: Upload coverage html
uses: actions/[email protected]
with:
name: coverage-results-${{ matrix.os-type }}.zip
path: build/reports/kover/html

- name: Add coverage report to PR
id: kover
uses: mi-kas/kover-report@v1
with:
path: ${{ github.workspace }}/build/reports/kover/report.xml
token: ${{ secrets.ATALA_GITHUB_TOKEN }}
title: Code Coverage
update-comment: true
min-coverage-overall: 90
min-coverage-changed-files: 90
coverage-counter-type: LINE

- name: Build for Windows
if: matrix.os-type == 'windows'
Expand Down
32 changes: 32 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id("org.jetbrains.dokka") version "1.7.10"
id("org.jlleitschuh.gradle.ktlint") version "11.0.0"
id("maven-publish")
id("org.jetbrains.kotlinx.kover") version "0.7.2"
}

buildscript {
Expand All @@ -23,6 +24,28 @@ buildscript {
version = "1.7.0-alpha"
group = "io.iohk.atala.prism.apollo"

dependencies {
kover(project(":apollo"))
kover(project(":hashing"))
kover(project(":uuid"))
kover(project(":base16"))
kover(project(":base32"))
kover(project(":base58"))
kover(project(":base64"))
kover(project(":multibase"))
kover(project(":utils"))
kover(project(":base-symmetric-encryption"))
kover(project(":secure-random"))
kover(project(":aes"))
kover(project(":base-asymmetric-encryption"))
// kover(project(":rsa"))
// kover(project(":ecdsa"))
kover(project(":varint"))
// kover(project(":jose"))
kover(project("secp256k1-kmp"))
kover(project("secp256k1-kmp:native"))
}

allprojects {
version = "1.7.0-alpha"
group = "io.iohk.atala.prism.apollo"
Expand Down Expand Up @@ -51,6 +74,7 @@ allprojects {

subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "org.jetbrains.kotlinx.kover")

ktlint {
verbose.set(true)
Expand Down Expand Up @@ -133,3 +157,11 @@ fun Project.getLocalProperty(key: String, file: String = "local.properties"): St

return if (value == "null") null else value
}

koverReport {
filters {
excludes {
classes("io.iohk.atala.prism.apollo.utils.bip39.wordlists.*")
}
}
}

0 comments on commit 7a65022

Please sign in to comment.