diff --git a/.circleci/config.yml b/.circleci/config.yml index 254703b..6c3ac5d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,9 @@ # # Check https://circleci.com/docs/2.0/language-java/ for more details # -version: 2 +version: 2.1 +orbs: + codecov: codecov/codecov@1.0.5 jobs: build: docker: @@ -42,3 +44,5 @@ jobs: - run: gradle ktlintCheck # run tests! - run: gradle test + # upload coverages to codecov + - run: bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md new file mode 100644 index 0000000..135ec82 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![CircleCI](https://circleci.com/gh/ProjectMapK/Shared.svg?style=svg)](https://circleci.com/gh/ProjectMapK/Shared) +[![](https://jitci.com/gh/ProjectMapK/Shared/svg)](https://jitci.com/gh/ProjectMapK/Shared) +[![codecov](https://codecov.io/gh/ProjectMapK/Shared/branch/master/graph/badge.svg)](https://codecov.io/gh/ProjectMapK/Shared) + +A `Shared` module for ProjectMapK. +==== +You can use this module to easily make function calls by `Kotlin`'s `Reflection`. +Also, you can use the features of ProjectMapK in this module. diff --git a/build.gradle.kts b/build.gradle.kts index 905b321..dabf2ec 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("java") id("org.jetbrains.kotlin.jvm") version "1.3.72" id("org.jlleitschuh.gradle.ktlint") version "9.2.1" + id("jacoco") } group = "com.mapk" @@ -57,5 +58,15 @@ tasks { } test { useJUnitPlatform() + // テスト終了時にjacocoのレポートを生成する + finalizedBy(jacocoTestReport) + } + + jacocoTestReport { + reports { + xml.isEnabled = true + csv.isEnabled = false + html.isEnabled = true + } } }