Skip to content

Commit d08a35e

Browse files
authored
Merge pull request #79 from PgBulkInsert/codeclimate
Codeclimate
2 parents 888e4e7 + 45a36b2 commit d08a35e

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

.github/workflows/maven.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,14 @@ jobs:
3737
with:
3838
java-version: 11
3939
- name: Build with Maven
40-
run: mvn -B package --file pom.xml
41-
working-directory: ./PgBulkInsert
40+
uses: paambaati/codeclimate-action@v2.6.0
41+
env:
42+
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
43+
JACOCO_SOURCE_PATH: "${{github.workspace}}/PgBulkInsert/pgbulkinsert-bulkprocessor/src/main/java ${{github.workspace}}/PgBulkInsert/pgbulkinsert-core/src/main/java ${{github.workspace}}/PgBulkInsert/pgbulkinsert-jpa/src/main/java ${{github.workspace}}/PgBulkInsert/pgbulkinsert-rowwriter/src/main/java"
44+
with:
45+
coverageCommand: mvn -B package --file ${{github.workspace}}/PgBulkInsert/pom.xml
46+
coverageLocations: |
47+
${{github.workspace}}/PgBulkInsert/pgbulkinsert-bulkprocessor/target/site/jacoco/jacoco.xml:jacoco
48+
${{github.workspace}}/PgBulkInsert/pgbulkinsert-core/target/site/jacoco/jacoco.xml:jacoco
49+
${{github.workspace}}/PgBulkInsert/pgbulkinsert-jpa/target/site/jacoco/jacoco.xml:jacoco
50+
${{github.workspace}}/PgBulkInsert/pgbulkinsert-rowwriter/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)