Skip to content

Commit 0671b2d

Browse files
committed
Add test coverage
1 parent f5b07e9 commit 0671b2d

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up environment
1919
uses: actions/setup-java@v1
2020
with:
21-
java-version: ${{java-version}}
21+
java-version: ${{ matrix.java-version }}
2222
- name: Build with Gradle
2323
run: ./gradlew buildPlugin
2424
test:
@@ -32,3 +32,7 @@ jobs:
3232
java-version: 11
3333
- name: Test with Gradle
3434
run: ./gradlew test --info
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@v1
37+
with:
38+
file: build/reports/jacoco/test/jacocoTestReport.xml

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This plugin adds an intention to open regular expressions on regex101.com
66
[![Plugin downloads](https://img.shields.io/jetbrains/plugin/d/14461-open-regex101?style=flat-square)](https://plugins.jetbrains.com/plugin/14461-open-regex101)
77
[![Plugin stars](https://img.shields.io/jetbrains/plugin/r/stars/14461-open-regex101?style=flat-square)](https://plugins.jetbrains.com/plugin/14461-open-regex101)
88
[![Build status](https://img.shields.io/github/workflow/status/aesy/regex101-intellij/Continous%20Integration?style=flat-square)](https://github.com/aesy/regex101-intellij/actions)
9+
[![Test coverage](https://img.shields.io/codecov/c/github/aesy/regex101-intellij?style=flat-square)](https://codecov.io/github/aesy/regex101-intellij)
910
[![MIT license](https://img.shields.io/github/license/aesy/regex101-intellij.svg?style=flat-square)](https://github.com/aesy/regex101-intellij/blob/master/LICENSE)
1011

1112
## Installation

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import org.jetbrains.intellij.tasks.*
22
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33

44
plugins {
5+
jacoco
56
kotlin("jvm") version "1.3.61"
67
id("org.jetbrains.intellij") version "0.4.21"
78
}
@@ -30,6 +31,12 @@ intellij {
3031
}
3132

3233
tasks {
34+
jacocoTestReport {
35+
reports {
36+
xml.isEnabled = true
37+
}
38+
}
39+
3340
withType<Wrapper> {
3441
gradleVersion = "6.5"
3542
}
@@ -47,6 +54,7 @@ tasks {
4754

4855
withType<Test> {
4956
useJUnitPlatform()
57+
finalizedBy(jacocoTestReport)
5058
}
5159

5260
withType<PublishTask> {

0 commit comments

Comments
 (0)