Skip to content

Commit 66bac06

Browse files
committed
chore: add ci config about opentelemetry
Signed-off-by: chenhuan <xiangyuyu_2024@qq.com>
1 parent 75612bf commit 66bac06

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/java_unit_tests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,27 @@ jobs:
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

opengemini-client/src/test/java/io/opengemini/client/interceptor/TracingIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,4 @@ void testTracingIntegration() throws ExecutionException, InterruptedException {
191191

192192
}, "Tracing integration should not throw an exception");
193193
}
194-
}
194+
}

0 commit comments

Comments
 (0)