[Improve] support jacoco and codecov (#1985)

Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
This commit is contained in:
crossoverJie
2024-06-16 22:53:43 +08:00
committed by GitHub
co-authored by tomsun28
parent a6ac326581
commit 3186aa5eb6
2 changed files with 24 additions and 0 deletions
+4
View File
@@ -49,6 +49,10 @@ jobs:
java-version: 17
- name: Build with Maven
run: mvn clean -B package -Prelease --file pom.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build Image
env:
IMAGE_PUSH: false
+20
View File
@@ -138,6 +138,7 @@
<commons-collections4.version>4.4</commons-collections4.version>
<commons-jexl3>3.2.1</commons-jexl3>
<commons-net>3.10.0</commons-net>
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
</properties>
<dependencyManagement>
@@ -461,6 +462,25 @@
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>