Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up kover #4

Merged
merged 7 commits into from
Feb 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@ jobs:
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: setup jdk
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: test
run: ./gradlew check

build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: setup jdk
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: build the app
run: ./gradlew build
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions .idea/sparrow.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

9 changes: 9 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@ dependencies {
testImplementation(Libs.mockk)
testImplementation(Libs.testContainer)
}

tasks.koverVerify {
rule {
name = "Minimal line coverage rate in percent"
bound {
minValue = 40
}
}
}
2 changes: 1 addition & 1 deletion app/src/test/kotlin/se/thanh/sparrow/user/UserServiceIT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ internal class UserServiceIT(
runBlocking {
// add a new user
val resp = service.deleteOne(9999)
assertThat(resp).isFalse()
assertThat(resp).isFalse
}
}

Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
kotlin("jvm") version Version.kotlin apply false
id(Plugins.kotlinSerialization) version Version.kotlin apply false
id(Plugins.ktlint) version Version.ktlint apply true
id(Plugins.kover) version Version.kover
}


Expand Down Expand Up @@ -35,7 +36,7 @@ allprojects {

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
jvmTarget = "17"
freeCompilerArgs = listOf("-Xjsr305=strict")
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
object Version {
const val kotlin: String = "1.6.0"
const val kotlin: String = "1.6.10"
const val arrow: String = "1.0.1"
const val arrowEndpoint: String = "6f337d82e1"

const val kotlinx: String = "1.5.2"
const val kotlinx: String = "1.6.0"
const val reactorKotlinExtensions: String = "1.1.3"

const val kotlinxSerializationJson: String = "1.3.0"
const val ktlint: String = "10.1.0"
const val springBoot: String = "2.5.7"
const val springBoot: String = "2.6.2"
const val springDependency: String = "1.0.11.RELEASE"

const val r2dbcPostgres = "0.8.10.RELEASE"
const val r2dbcPool = "0.9.0.M2"
const val postgres = "42.2.24"
const val flyway = "8.0.0"

const val kotest: String = "5.0.0.M3"
const val kotest: String = "5.0.2"
const val kotestSpring: String = "1.0.1"
const val mockk: String = "1.12.0"
const val testcontainers: String = "1.16.0"
const val reactorTest: String = "3.4.10"

const val kover = "0.5.0"
}

object Libs {
Expand Down Expand Up @@ -74,4 +75,5 @@ object Plugins {
const val kotlinSpring: String = "plugin.spring"
const val springBoot: String = "org.springframework.boot"
const val springDependency: String = "io.spring.dependency-management"
const val kover: String = "org.jetbrains.kotlinx.kover"
}