Skip to content

Commit

Permalink
Jacoco reporting with codecov (#165)
Browse files Browse the repository at this point in the history
* Add codecov repost call to build scheme

* Add jacoco to core

* Add jacoco to vendor module

* Add jacoco to cli mopdule

* Fix jacoco generation

* Fix travis yml

* Fix build

* Fix build gradlew

* Add badge
  • Loading branch information
Vacxe authored and tagantroy committed Feb 8, 2019
1 parent c5e8ec2 commit 421e3e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
- stage: test
script:
- chmod 0600 $TRAVIS_BUILD_DIR/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa
- ./gradlew clean test integrationTest
- ./gradlew clean test jacocoTestReport integrationTest
- bash <(curl -s https://codecov.io/bash)
- stage: detekt
script: ./gradlew clean detektCheck
- stage: deploy
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/Malinskiy/marathon.svg?branch=develop)](https://travis-ci.org/Malinskiy/marathon)
[![codecov](https://codecov.io/gh/malinskiy/marathon/branch/develop/graph/badge.svg)](https://codecov.io/gh/malinskiy/marathon)
[![Slack](https://img.shields.io/badge/slack-chat-green.svg?logo=slack&longCache=true&style=flat)](https://join.slack.com/t/marathon-test-runner/shared_invite/enQtNDczODU5MDUzOTg0LTNhYjRhOGRhMjMwMGZjMjY5MTY3MDI3ZmMzNTRjYzhmOGRkNDQ5OTIzMzA4ODQ5YjZmMWNiZjljMzcyY2VhMzE)

# Marathon
Expand Down
7 changes: 7 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugins {
`java-library`
id("org.jetbrains.kotlin.jvm")
id("org.junit.platform.gradle.plugin")
jacoco
}

sourceSets {
Expand Down Expand Up @@ -56,6 +57,11 @@ dependencies {
testImplementation(TestLibraries.mockitoKotlin)
}

tasks.named<JacocoReport>("jacocoTestReport").configure {
reports.xml.isEnabled = true
reports.html.isEnabled = true
dependsOn(tasks.named("test"))
}

val integrationTest = task<Test>("integrationTest") {
description = "Runs integration tests."
Expand Down Expand Up @@ -87,6 +93,7 @@ junitPlatform {
include("spek")
}
}
enableStandardTestTask = true
}

// extension for configuration
Expand Down

0 comments on commit 421e3e8

Please sign in to comment.