Skip to content

Commit 7604ecd

Browse files
committed
added code coverage
1 parent 16ff969 commit 7604ecd

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

.github/workflows/maven-deploy-snapshot.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ jobs:
2828
env:
2929
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3030
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
31-
31+
- name: Test & publish code coverage
32+
uses: paambaati/codeclimate-action@v2.7.5
33+
env:
34+
CC_TEST_REPORTER_ID: "0ae6ed6c800841ebe2c77dbe17f0dff679e51a80daf2b45f6afa40ed8dec60c7"
35+
JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java"
36+
with:
37+
coverageLocations: ${{github.workspace}}/target/site/jacoco/jacoco.xml:jacoco

.github/workflows/maven-pull-request.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ jobs:
1717
java-version: 1.8
1818
- name: Build with Maven
1919
run: mvn --no-transfer-progress -B verify -Drevision=${GITHUB_REF##*/} --file pom.xml
20+
- name: Test & publish code coverage
21+
uses: paambaati/codeclimate-action@v2.7.5
22+
env:
23+
CC_TEST_REPORTER_ID: "0ae6ed6c800841ebe2c77dbe17f0dff679e51a80daf2b45f6afa40ed8dec60c7"
24+
JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java"
25+
with:
26+
coverageLocations: ${{github.workspace}}/target/site/jacoco/jacoco.xml:jacoco

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Maven Central](https://img.shields.io/maven-central/v/de.tisoft.rsyntaxtextarea/rsyntaxtextarea-antlr4-extension)](https://search.maven.org/artifact/de.tisoft.rsyntaxtextarea/rsyntaxtextarea-antlr4-extension)
44
[![GitHub](https://img.shields.io/github/license/tisoft/rsyntaxtextarea-antlr4-extension)](LICENSE)
55
[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/tisoft/rsyntaxtextarea-antlr4-extension)](https://codeclimate.com/github/tisoft/rsyntaxtextarea-antlr4-extension/maintainability)
6+
[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/tisoft/rsyntaxtextarea-antlr4-extension)](https://codeclimate.com/github/tisoft/rsyntaxtextarea-antlr4-extension/coverage)
67

78
This project contains an extension for the [RSyntaxTextArea](https://github.com/bobbylight/RSyntaxTextArea) library, that allows the usage of [ANTLR 4](https://www.antlr.org) lexers and parsers.
89

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,26 @@
309309
</execution>
310310
</executions>
311311
</plugin>
312+
<plugin>
313+
<groupId>org.jacoco</groupId>
314+
<artifactId>jacoco-maven-plugin</artifactId>
315+
<version>0.8.6</version>
316+
<executions>
317+
<execution>
318+
<id>agent-for-ut</id>
319+
<goals>
320+
<goal>prepare-agent</goal>
321+
</goals>
322+
</execution>
323+
<execution>
324+
<id>jacoco-site</id>
325+
<phase>verify</phase>
326+
<goals>
327+
<goal>report</goal>
328+
</goals>
329+
</execution>
330+
</executions>
331+
</plugin>
312332
</plugins>
313333
</build>
314334
<profiles>

0 commit comments

Comments
 (0)