File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 with :
3232 java-version : ' 17'
3333 distribution : ' temurin'
34+
35+ git clone https://github.com/openGemini/observability.git
36+ cd observability/trace/java
37+ mvn install -DskipTests
38+
39+ - name : Run Tests with JaCoCo
40+ run : |
41+ mvn test -pl :your-main-module -fae -Djacoco.include=com.opengemini.** -Djacoco.output=file -Djacoco.destFile=coverage-main.exec
42+
43+ coverage_files="coverage-main.exec"
44+ for test_dir in tests/*; do
45+ if [ -d "$test_dir" ] && [ -f "$test_dir/pom.xml" ]; then
46+ cd "$test_dir"
47+ mvn test -fae -Djacoco.include=com.opengemini.** -Djacoco.output=file -Djacoco.destFile=../../coverage-${test_dir##*/}.exec
48+ cd ../..
49+ coverage_files="$coverage_files coverage-${test_dir##*/}.exec"
50+ fi
51+ done
52+
53+ mvn jacoco:merge -fae -Djacoco.dataFile=$coverage_files -Djacoco.destFile=coverage-merged.exec
54+ mvn jacoco:report -fae -Djacoco.dataFile=coverage-merged.exec -Djacoco.outputDirectory=jacoco-report
3455 - name : setup OpenGemini
3556 uses : hezhangjian/setup-opengemini-action@main
3657 - name : unit tests
You can’t perform that action at this time.
0 commit comments