This is an automated email from the ASF dual-hosted git repository.
weibin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-graphar.git
The following commit(s) were added to refs/heads/main by this push:
new b7f54eea feat(devinfra): Add test coverage to CI to measure the
covering code of unit test (Spark) (#589)
b7f54eea is described below
commit b7f54eeaef5349f668b05ff6d6febb018d89eb59
Author: Elssky <[email protected]>
AuthorDate: Fri Aug 16 10:20:57 2024 +0800
feat(devinfra): Add test coverage to CI to measure the covering code of
unit test (Spark) (#589)
---
.github/workflows/spark.yaml | 14 +++++++++++++-
maven-projects/spark/pom.xml | 19 +++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/spark.yaml b/.github/workflows/spark.yaml
index cae0fc2d..64bed07b 100644
--- a/.github/workflows/spark.yaml
+++ b/.github/workflows/spark.yaml
@@ -98,6 +98,18 @@ jobs:
echo "Test ${{ matrix.mvn-profile }}"
mvn test --no-transfer-progress -Dspotless.check.skip=true -P ${{
matrix.mvn-profile }}
+ - name: Generate JaCoCo Coverage Report
+ working-directory: maven-projects/spark
+ run: |
+ export JAVA_HOME=${JAVA_HOME_11_X64}
+ mvn jacoco:report --no-transfer-progress -P ${{ matrix.mvn-profile }}
+
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v4
+ with:
+ files: "./maven-projects/spark/graphar/target/site/jacoco/jacoco.xml"
+ token: ${{ secrets.CODECOV_TOKEN }}
+
- name: Run Neo4j2GraphAr example
working-directory: maven-projects/spark
run: |
@@ -174,4 +186,4 @@ jobs:
scripts/build.sh ${{ matrix.mvn-profile }}
- scripts/run-ldbc-sample2graphar.sh
+ scripts/run-ldbc-sample2graphar.sh
\ No newline at end of file
diff --git a/maven-projects/spark/pom.xml b/maven-projects/spark/pom.xml
index 3de2f5c3..216cfc64 100644
--- a/maven-projects/spark/pom.xml
+++ b/maven-projects/spark/pom.xml
@@ -155,6 +155,25 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.8</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>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]