Skip to content

Commit 9240ae8

Browse files
authored
Add CodeCov GitHub action and badge. (dapr#339)
* Add CodeCov GitHub action and badge. * Change comment behavior and exclude sdk-tests.
1 parent f6b56bb commit 9240ae8

File tree

4 files changed

+38
-5
lines changed

4 files changed

+38
-5
lines changed

.codecov.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ignore:
2+
- examples
3+
- sdk-tests
4+
comment:
5+
# Delete old comment and post new one for new coverage information.
6+
behavior: new

.github/workflows/build.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Build
22

3-
on:
3+
on:
44
push:
55
branches:
66
- master
77
- release-*
88
tags:
99
- v*
10-
10+
1111
pull_request:
12-
branches:
12+
branches:
1313
- master
1414
- release-*
1515

@@ -98,6 +98,8 @@ jobs:
9898
run: mvn compile -q
9999
- name: Unit tests
100100
run: mvn test -q
101+
- name: Codecov
102+
uses: codecov/codecov-action@v1
101103
- name: Install jars
102104
run: mvn install -q
103105
- name: Integration tests

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Build Status](https://github.com/dapr/java-sdk/workflows/Build/badge.svg?event=push&branch=master)](https://github.com/dapr/java-sdk/actions?workflow=Build)
44
[![Gitter](https://badges.gitter.im/Dapr/java-sdk.svg)](https://gitter.im/Dapr/java-sdk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
5+
[![codecov](https://codecov.io/gh/dapr/java-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/dapr/java-sdk)
56
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
67

78
This is the Dapr SDK for Java, including the following features:
@@ -92,13 +93,13 @@ For a Gradle project, add the following to your `build.gradle` file:
9293
repositories {
9394
...
9495
// Dapr repositories
95-
maven {
96+
maven {
9697
url "https://oss.sonatype.org/content/repositories/snapshots"
9798
mavenContent {
9899
snapshotsOnly()
99100
}
100101
}
101-
maven {
102+
maven {
102103
url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
103104
}
104105
}

pom.xml

+24
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,25 @@
7676

7777
<build>
7878
<plugins>
79+
<plugin>
80+
<groupId>org.jacoco</groupId>
81+
<artifactId>jacoco-maven-plugin</artifactId>
82+
<version>0.8.6</version>
83+
<executions>
84+
<execution>
85+
<goals>
86+
<goal>prepare-agent</goal>
87+
</goals>
88+
</execution>
89+
<execution>
90+
<id>report</id>
91+
<phase>test</phase>
92+
<goals>
93+
<goal>report</goal>
94+
</goals>
95+
</execution>
96+
</executions>
97+
</plugin>
7998
<plugin>
8099
<groupId>org.apache.maven.plugins</groupId>
81100
<artifactId>maven-gpg-plugin</artifactId>
@@ -191,6 +210,11 @@
191210

192211
<reporting>
193212
<plugins>
213+
<plugin>
214+
<groupId>org.codehaus.mojo</groupId>
215+
<artifactId>cobertura-maven-plugin</artifactId>
216+
<version>2.7</version>
217+
</plugin>
194218
<plugin>
195219
<groupId>org.apache.maven.plugins</groupId>
196220
<artifactId>maven-project-info-reports-plugin</artifactId>

0 commit comments

Comments
 (0)