Skip to content

Commit

Permalink
Merge pull request #11 from tre3p/#8
Browse files Browse the repository at this point in the history
#8: add jacoco and report to CC logic
  • Loading branch information
tre3p authored Aug 3, 2024
2 parents 6c34d73 + 18a6746 commit 532a06a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ jobs:
- name: Run KtLint
run: make lint
- name: Run tests
run: make test
run: make test
- name: Publish test coverage
uses: paambaati/codeclimate-action@v8.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java"
with:
coverageCommand: make report
coverageLocations: ${{github.workspace}}/target/site/jacoco/jacoco.xml:jacoco
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ test:
mvn clean test

lint:
mvn clean verify -DskipTests
mvn clean verify -DskipTests

report:
mvn jacoco:report
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,25 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 532a06a

Please sign in to comment.