Add CodeCov GitHub action and badge. (#339)

* Add CodeCov GitHub action and badge.

* Change comment behavior and exclude sdk-tests.
This commit is contained in:
Nghia Tran 2020-09-18 15:12:29 -07:00 committed by GitHub
parent f6b56bb376
commit 9240ae81db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 5 deletions

6
.codecov.yaml Normal file
View File

@ -0,0 +1,6 @@
ignore:
- examples
- sdk-tests
comment:
# Delete old comment and post new one for new coverage information.
behavior: new

View File

@ -1,15 +1,15 @@
name: Build
on:
on:
push:
branches:
- master
- release-*
tags:
- v*
pull_request:
branches:
branches:
- master
- release-*
@ -98,6 +98,8 @@ jobs:
run: mvn compile -q
- name: Unit tests
run: mvn test -q
- name: Codecov
uses: codecov/codecov-action@v1
- name: Install jars
run: mvn install -q
- name: Integration tests

View File

@ -2,6 +2,7 @@
[![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)
[![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)
[![codecov](https://codecov.io/gh/dapr/java-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/dapr/java-sdk)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
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:
repositories {
...
// Dapr repositories
maven {
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
mavenContent {
snapshotsOnly()
}
}
maven {
maven {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
}

24
pom.xml
View File

@ -76,6 +76,25 @@
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
@ -191,6 +210,11 @@
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>