Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Configure JaCoCo in Maven
Browse files Browse the repository at this point in the history
  • Loading branch information
Anatoly Frolov committed Feb 4, 2024
1 parent 2d02e69 commit 5bdc4b1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[![GitHub tag](https://img.shields.io/github/tag/quark-database/.github?include_prereleases=&sort=semver&color=blue)](https://github.com/quark-database/server/releases/)
[![License](https://img.shields.io/badge/License-MIT-blue)](#license)
[![issues - server](https://img.shields.io/github/issues/quark-database/.github)](https://github.com/quark-database/server/issues)
![Coverage](.github/badges/jacoco.svg)

## About Quark Server

Expand Down
33 changes: 31 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,44 @@
</executions>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<workingDirectory>/test</workingDirectory>
<workingDirectory>${project.basedir}/test</workingDirectory>
<!-- <skip>true</skip>-->
<useFile>false</useFile>
<argLine>--enable-preview</argLine>
<argLine>${surefireArgLine} --enable-preview</argLine> <!---enable-preview -->
</configuration>
</plugin>

Expand Down

0 comments on commit 5bdc4b1

Please sign in to comment.