Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 66ad13f

Browse files
authored
Merge pull request #40 from k163377/add_coverage
Add coverage badge.
2 parents e8b7d06 + 7e3f099 commit 66ad13f

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.circleci/config.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
#
33
# Check https://circleci.com/docs/2.0/language-java/ for more details
44
#
5-
version: 2
5+
version: 2.1
6+
orbs:
7+
codecov: codecov/[email protected]
68
jobs:
79
build:
810
docker:
@@ -42,3 +44,5 @@ jobs:
4244
- run: gradle ktlintCheck
4345
# run tests!
4446
- run: gradle test
47+
# upload coverages to codecov
48+
- run: bash <(curl -s https://codecov.io/bash)

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
22
[![CircleCI](https://circleci.com/gh/ProjectMapK/KMapper.svg?style=svg)](https://circleci.com/gh/ProjectMapK/KMapper)
33
[![](https://jitci.com/gh/ProjectMapK/KMapper/svg)](https://jitci.com/gh/ProjectMapK/KMapper)
4+
[![codecov](https://codecov.io/gh/ProjectMapK/KMapper/branch/master/graph/badge.svg)](https://codecov.io/gh/ProjectMapK/KMapper)
45

56
KMapper
67
====

build.gradle.kts

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
id("org.jetbrains.kotlin.jvm") version "1.3.72"
55
// その他補助系
66
id("org.jlleitschuh.gradle.ktlint") version "9.2.1"
7+
id("jacoco")
78
id("com.github.ben-manes.versions") version "0.28.0"
89
}
910

@@ -60,5 +61,15 @@ tasks {
6061
}
6162
test {
6263
useJUnitPlatform()
64+
// テスト終了時にjacocoのレポートを生成する
65+
finalizedBy(jacocoTestReport)
66+
}
67+
68+
jacocoTestReport {
69+
reports {
70+
xml.isEnabled = true
71+
csv.isEnabled = false
72+
html.isEnabled = true
73+
}
6374
}
6475
}

0 commit comments

Comments
 (0)