Skip to content

Commit

Permalink
feat(devinfra): Add test coverage to CI to measure the covering code …
Browse files Browse the repository at this point in the history
…of unit test (Spark) (#589)
  • Loading branch information
Elssky authored Aug 16, 2024
1 parent 60fcede commit b7f54ee
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/spark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -174,4 +186,4 @@ jobs:
scripts/build.sh ${{ matrix.mvn-profile }}
scripts/run-ldbc-sample2graphar.sh
scripts/run-ldbc-sample2graphar.sh
19 changes: 19 additions & 0 deletions maven-projects/spark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit b7f54ee

Please sign in to comment.