Skip to content

Commit

Permalink
SC-1162: Replace Coveralls with JaCoCo (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigee authored Sep 5, 2024
1 parent 425689a commit e1152f4
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 46 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/code_coverage.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
distribution: adopt
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B --no-transfer-progress package --file pom.xml -DCI_ENV=true
run: mvn -B --no-transfer-progress package --file pom.xml -DCI_ENV=true verify
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![license](https://img.shields.io/github/license/apache/incubator-stormcrawler.svg?maxAge=2592000?style=plastic)](http://www.apache.org/licenses/LICENSE-2.0)
![Build Status](https://github.com/apache/incubator-stormcrawler/actions/workflows/maven.yml/badge.svg)
[![javadoc](https://javadoc.io/badge2/apache/incubator-stormcrawler-core/javadoc.svg)](https://javadoc.io/doc/org.apache.stormcrawler/stormcrawler-core/)
[![Coverage Status](https://coveralls.io/repos/github/apache/incubator-stormcrawler/badge.svg?branch=master)](https://coveralls.io/github/apache/incubator-stormcrawler?branch=master)

Apache StormCrawler (Incubating) is an open source collection of resources for building low-latency, scalable web crawlers on [Apache Storm](http://storm.apache.org/). It is provided under [Apache License](http://www.apache.org/licenses/LICENSE-2.0) and is written mostly in Java.

Expand Down
7 changes: 7 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ under the License.
<caffeine.version>3.1.8</caffeine.version>
<xsoup.version>0.3.7</xsoup.version>
<awaitility.version>4.2.0</awaitility.version>
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
<jacoco.classRatio>0.73</jacoco.classRatio>
<jacoco.instructionRatio>0.56</jacoco.instructionRatio>
<jacoco.methodRatio>0.62</jacoco.methodRatio>
<jacoco.branchRatio>0.50</jacoco.branchRatio>
<jacoco.lineRatio>0.56</jacoco.lineRatio>
<jacoco.complexityRatio>0.44</jacoco.complexityRatio>
</properties>

<build>
Expand Down
7 changes: 7 additions & 0 deletions external/opensearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ under the License.

<properties>
<opensearch.version>2.12.0</opensearch.version>
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
<jacoco.classRatio>0.27</jacoco.classRatio>
<jacoco.instructionRatio>0.27</jacoco.instructionRatio>
<jacoco.methodRatio>0.25</jacoco.methodRatio>
<jacoco.branchRatio>0.17</jacoco.branchRatio>
<jacoco.lineRatio>0.29</jacoco.lineRatio>
<jacoco.complexityRatio>0.13</jacoco.complexityRatio>
</properties>

<artifactId>stormcrawler-opensearch</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions external/playwright/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ under the License.
<playwright.version>1.43.0</playwright.version>
<awaitility.version>4.2.1</awaitility.version>
<wiremock.version>3.5.4</wiremock.version>
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
<jacoco.classRatio>0.00</jacoco.classRatio>
<jacoco.instructionRatio>0.00</jacoco.instructionRatio>
<jacoco.methodRatio>0.00</jacoco.methodRatio>
<jacoco.branchRatio>0.00</jacoco.branchRatio>
<jacoco.lineRatio>0.00</jacoco.lineRatio>
<jacoco.complexityRatio>0.00</jacoco.complexityRatio>
</properties>

<dependencies>
Expand Down
10 changes: 10 additions & 0 deletions external/tika/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ under the License.
<url>https://github.com/apache/incubator-stormcrawler/tree/master/external/tika</url>
<description>Tika-based parser bolt for StormCrawler</description>

<properties>
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
<jacoco.classRatio>0.25</jacoco.classRatio>
<jacoco.instructionRatio>0.36</jacoco.instructionRatio>
<jacoco.methodRatio>0.14</jacoco.methodRatio>
<jacoco.branchRatio>0.20</jacoco.branchRatio>
<jacoco.lineRatio>0.37</jacoco.lineRatio>
<jacoco.complexityRatio>0.13</jacoco.complexityRatio>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.tika</groupId>
Expand Down
7 changes: 7 additions & 0 deletions external/urlfrontier/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ under the License.

<properties>
<urlfrontier.version>2.3.1</urlfrontier.version>
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
<jacoco.classRatio>0.50</jacoco.classRatio>
<jacoco.instructionRatio>0.51</jacoco.instructionRatio>
<jacoco.methodRatio>0.53</jacoco.methodRatio>
<jacoco.branchRatio>0.45</jacoco.branchRatio>
<jacoco.lineRatio>0.47</jacoco.lineRatio>
<jacoco.complexityRatio>0.35</jacoco.complexityRatio>
</properties>

<build>
Expand Down
7 changes: 7 additions & 0 deletions external/warc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ under the License.
<properties>
<commons-codec.version>1.10</commons-codec.version>
<jwarc.version>0.29.0</jwarc.version>
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
<jacoco.classRatio>0.75</jacoco.classRatio>
<jacoco.instructionRatio>0.65</jacoco.instructionRatio>
<jacoco.methodRatio>0.68</jacoco.methodRatio>
<jacoco.branchRatio>0.54</jacoco.branchRatio>
<jacoco.lineRatio>0.66</jacoco.lineRatio>
<jacoco.complexityRatio>0.41</jacoco.complexityRatio>
</properties>

<dependencies>
Expand Down
53 changes: 53 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ under the License.
<testcontainers.version>1.19.7</testcontainers.version>
<maven.mojo.license.plugin>2.4.0</maven.mojo.license.plugin>
<jacoco.maven.plugin>0.8.11</jacoco.maven.plugin>
<jacoco.haltOnFailure>false</jacoco.haltOnFailure>
<jacoco.classRatio>1.00</jacoco.classRatio>
<jacoco.instructionRatio>1.00</jacoco.instructionRatio>
<jacoco.methodRatio>1.00</jacoco.methodRatio>
<jacoco.branchRatio>1.00</jacoco.branchRatio>
<jacoco.lineRatio>1.00</jacoco.lineRatio>
<jacoco.complexityRatio>1.00</jacoco.complexityRatio>

<skip.format.code>true</skip.format.code>
</properties>
Expand Down Expand Up @@ -262,6 +269,52 @@ under the License.
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>CLASS</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco.classRatio}</minimum>
</limit>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco.instructionRatio}</minimum>
</limit>
<limit>
<counter>METHOD</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco.methodRatio}</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco.branchRatio}</minimum>
</limit>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco.lineRatio}</minimum>
</limit>
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco.complexityRatio}</minimum>
</limit>
</limits>
</rule>
</rules>
<haltOnFailure>${jacoco.haltOnFailure}</haltOnFailure>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down

0 comments on commit e1152f4

Please sign in to comment.