Skip to content

Commit

Permalink
test coverage report (#38)
Browse files Browse the repository at this point in the history
* add jacoco

* test coverage step

* use kover for coverage report
  • Loading branch information
himadieievsv authored Jan 6, 2024
1 parent df46299 commit c9aaea2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: All tests and codecov
name: Integration Tests

on:
push:
Expand Down Expand Up @@ -51,8 +51,5 @@ jobs:
./gradlew \
:redpulsar-core:test \
:redpulsar-jedis:test \
:redpulsar-lettuce:test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
:redpulsar-lettuce:test \
-DexcludeTags="unit"
13 changes: 12 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Test
name: Unit Tests

on:
push:
Expand All @@ -22,3 +22,14 @@ jobs:
:redpulsar-jedis:test \
:redpulsar-lettuce:test \
-DexcludeTags="integration"
- name: Test Coverage
run: |
./gradlew \
:redpulsar-core:koverXmlReport \
:redpulsar-jedis:koverXmlReport \
:redpulsar-lettuce:koverXmlReport \
-DexcludeTags="integration"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ buildscript {

plugins {
kotlin("jvm") version "1.9.22"
id("org.jlleitschuh.gradle.ktlint") version "12.0.3"
`java-library`
id("org.jlleitschuh.gradle.ktlint") version "12.0.3"
id("org.jetbrains.kotlinx.kover") version "0.7.5"
`maven-publish`
idea
}
Expand All @@ -27,6 +28,7 @@ subprojects {
apply(plugin = "idea")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.kotlinx.kover")

kotlin {
jvmToolchain(11)
Expand Down

0 comments on commit c9aaea2

Please sign in to comment.