Skip to content

Commit 2468901

Browse files
committed
attempt to instrument with jacoco and submit coverage to codeclimate
1 parent 888e4e7 commit 2468901

3 files changed

Lines changed: 28 additions & 1 deletion

File tree

.github/workflows/maven.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,10 @@ jobs:
3737
with:
3838
java-version: 11
3939
- name: Build with Maven
40-
run: mvn -B package --file pom.xml
40+
uses: paambaati/codeclimate-action@v2.6.0
4141
working-directory: ./PgBulkInsert
42+
env:
43+
CC_TEST_REPORTER_ID: $${secrets.CC_TEST_REPORTER_ID}}
44+
with:
45+
coverageCommand: mvn -B package
46+
coverageLocations: ${{github.workspace}}/PgBulkInsert/*/target/site/jacoco/jacoco.xml:jacoco

PgBulkInsert/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,26 @@
129129
</execution>
130130
</executions>
131131
</plugin>
132+
<plugin>
133+
<groupId>org.jacoco</groupId>
134+
<artifactId>jacoco-maven-plugin</artifactId>
135+
<version>0.8.5</version>
136+
<executions>
137+
<execution>
138+
<id>default-prepare-agent</id>
139+
<goals>
140+
<goal>prepare-agent</goal>
141+
</goals>
142+
</execution>
143+
<execution>
144+
<id>default-report</id>
145+
<phase>prepare-package</phase>
146+
<goals>
147+
<goal>report</goal>
148+
</goals>
149+
</execution>
150+
</executions>
151+
</plugin>
132152
</plugins>
133153
</build>
134154

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
![](https://github.com/PgBulkInsert/PgBulkInsert/workflows/Java%20CI%20with%20Maven/badge.svg)
99
![](https://maven-badges.herokuapp.com/maven-central/de.bytefish.pgbulkinsert/pgbulkinsert-core/badge.svg)
10+
[![Maintainability](https://api.codeclimate.com/v1/badges/311ce156ff026549ba7f/maintainability)](https://codeclimate.com/github/PgBulkInsert/PgBulkInsert/maintainability)
11+
[![Test Coverage](https://api.codeclimate.com/v1/badges/311ce156ff026549ba7f/test_coverage)](https://codeclimate.com/github/PgBulkInsert/PgBulkInsert/test_coverage)
1012

1113
PgBulkInsert is a Java library for Bulk Inserts to PostgreSQL using the Binary COPY Protocol.
1214

0 commit comments

Comments
 (0)