This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new e68954db [CELEBORN-81] Add codecov. (#1026)
e68954db is described below
commit e68954dbae8ec6e78a51c1f967535d4b60bde0e9
Author: Ethan Feng <[email protected]>
AuthorDate: Fri Dec 9 12:11:45 2022 +0800
[CELEBORN-81] Add codecov. (#1026)
---
.github/workflows/maven.yml | 5 +++++
pom.xml | 31 +++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 0f3fb021..01fb4b54 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -34,3 +34,8 @@ jobs:
check-latest: false
- name: Test with Maven
run: build/mvn -Pgoogle-mirror,spark-${{ matrix.spark }} test
+ - name: Upload coverage to Codecov
+ if: |
+ matrix.java == 8 &&
+ matrix.spark == '3.3'
+ uses: codecov/codecov-action@v3
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 982f1187..45e7bc39 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,6 +103,7 @@
<maven.plugin.shade.version>3.4.0</maven.plugin.shade.version>
<maven.plugin.spotless.version>2.24.1</maven.plugin.spotless.version>
<maven.plugin.surefire.version>3.0.0-M7</maven.plugin.surefire.version>
+
<maven.plugin.jacoco-maven-plugin.version>0.8.7</maven.plugin.jacoco-maven-plugin.version>
<!-- Allow modules to enable / disable certain build plugins easily. -->
<testJarPhase>prepare-package</testJarPhase>
@@ -824,6 +825,31 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${maven.plugin.jacoco-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>pre-test</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+
<outputDirectory>${project.build.directory}/codecov</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</pluginManagement>
@@ -862,6 +888,11 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ </plugin>
</plugins>
</build>