Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Added code coverage with codecov.io Hexlet#5
Browse files Browse the repository at this point in the history
  • Loading branch information
samokisha committed Sep 7, 2019
1 parent 88eee47 commit 4263d85
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
language: java
jdk:
- openjdk12
- openjdk12
after_success:
- bash <(curl -s https://codecov.io/bash)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.com/Hexlet/hexlet-correction.svg?branch=master)](https://travis-ci.com/Hexlet/hexlet-correction)
[![codecov](https://codecov.io/gh/Hexlet/hexlet-correction/branch/master/graph/badge.svg)](https://codecov.io/gh/Hexlet/hexlet-correction)

# hexlet-correction

Expand Down
55 changes: 55 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
<lombok.version>1.18.8</lombok.version>
<h2database.version>1.4.199</h2database.version>
<checkstyle.config.location>checkstyle.xml</checkstyle.config.location>

<!-- Code Coverage -->
<jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
<jacoco-maven-plugin.lines-coverage-ratio>0.8</jacoco-maven-plugin.lines-coverage-ratio>
<jacoco-maven-plugin.methods-coverage-ratio>0.8</jacoco-maven-plugin.methods-coverage-ratio>
</properties>

<dependencies>
Expand Down Expand Up @@ -88,6 +93,56 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<configuration>
<excludes>
<exclude>**/HexletCorrectionApplication.*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>jacoco-check</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>PACKAGE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-maven-plugin.lines-coverage-ratio}</minimum>
</limit>
<limit>
<counter>METHOD</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-maven-plugin.methods-coverage-ratio}</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 4263d85

Please sign in to comment.