Skip to content

Commit

Permalink
build: introduce code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jimirocks committed Feb 8, 2024
1 parent 9fcb6ff commit f33a69c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,13 @@ jobs:

- name: Check with Gradle
run: ./gradlew -p ${{ inputs.projectDir }} clean check

- name: Generate Coverage report
if: ${{ inputs.projectDir == '.' }}
run: ./gradlew -p ${{ inputs.projectDir }} koverXmlReport

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
if: ${{ inputs.projectDir == '.' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotest.multiplatform)
alias(libs.plugins.detekt)
alias(libs.plugins.kover)
`maven-publish`
}

Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotest-multiplatform = { id = "io.kotest.multiplatform", version.ref = "kotest" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt"}
kover = { id = "org.jetbrains.kotlinx.kover", version = "0.7.5" }

0 comments on commit f33a69c

Please sign in to comment.