mirror of
https://github.com/Prominence/openweathermap-java-api.git
synced 2026-03-05 05:56:43 +03:00
Added codecov support.
This commit is contained in:
parent
c44e97745f
commit
6e0ddc2a83
@ -1,8 +1,11 @@
|
|||||||
language: java
|
language: java
|
||||||
|
|
||||||
install: mvn install -DskipTests -Dgpg.skip
|
install: mvn install -DskipTests -Dgpg.skip
|
||||||
script: mvn test -Dmaven.skip.deploy=true -Dgpg.skip
|
script: mvn cobertura:cobertura -Dmaven.skip.deploy=true -Dgpg.skip
|
||||||
|
|
||||||
jdk:
|
jdk:
|
||||||
- openjdk8
|
- openjdk8
|
||||||
- openjdk11
|
- openjdk11
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
@ -1,4 +1,4 @@
|
|||||||
# OpenWeatherMap Java API [![Build Status][ci-shield]][ci-link]
|
# OpenWeatherMap Java API [![Build Status][ci-shield]][ci-link] [![codecov][codecov-shield]][codecov-link]
|
||||||
Java API for OpenWeatherMap services.
|
Java API for OpenWeatherMap services.
|
||||||
|
|
||||||
### Implemented features:
|
### Implemented features:
|
||||||
@ -51,4 +51,8 @@ compile('com.github.prominence:openweathermap-api:2.0-SNAPSHOT')
|
|||||||
MIT
|
MIT
|
||||||
|
|
||||||
[ci-shield]: https://travis-ci.org/Prominence/openweathermap-java-api.svg?branch=master
|
[ci-shield]: https://travis-ci.org/Prominence/openweathermap-java-api.svg?branch=master
|
||||||
[ci-link]: https://travis-ci.org/Prominence/openweathermap-java-api
|
[ci-link]: https://travis-ci.org/Prominence/openweathermap-java-api
|
||||||
|
|
||||||
|
|
||||||
|
[codecov-shield]: https://codecov.io/gh/Prominence/openweathermap-java-api/branch/master/graph/badge.svg
|
||||||
|
[codecov-link]: https://codecov.io/gh/Prominence/openweathermap-java-api
|
||||||
13
pom.xml
13
pom.xml
@ -130,6 +130,19 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>cobertura-maven-plugin</artifactId>
|
||||||
|
<version>2.7</version>
|
||||||
|
<configuration>
|
||||||
|
<quiet>true</quiet>
|
||||||
|
<formats>
|
||||||
|
<format>html</format>
|
||||||
|
<format>xml</format>
|
||||||
|
</formats>
|
||||||
|
<check />
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,7 @@ import java.io.InputStreamReader;
|
|||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
public final class RequestUtils {
|
public final class RequestUtils {
|
||||||
|
|
||||||
@ -78,7 +79,7 @@ public final class RequestUtils {
|
|||||||
private static String getRawResponse(InputStream inputStream) {
|
private static String getRawResponse(InputStream inputStream) {
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
|
|
||||||
try(BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
|
try(BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
|
||||||
String line;
|
String line;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
result.append(line);
|
result.append(line);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user