@@ -133,13 +133,14 @@ jobs:
133133 ./mvnw --batch-mode prepare-package
134134 ./mvnw --batch-mode scoverage:report
135135
136- - name : upload maven coverage
137- uses : codecov/codecov-action @v3
136+ - name : upload coverage
137+ uses : actions/upload-artifact @v3
138138 with :
139- files : java/**/target/site/jacoco/jacoco.xml,java/**/target/scoverage.xml
140- name : coverage-java
141- fail_ci_if_error : true
142- verbose : true
139+ name : coverage-java-report-${{ github.sha }}
140+ path : |
141+ java/**/target/site/jacoco/jacoco.xml
142+ java/**/target/scoverage.xml
143+ retention-days : 3
143144
144145 - name : stop services
145146 run : |
@@ -283,13 +284,14 @@ jobs:
283284 python/openmldb_sdk/tests/pytest.xml
284285 python/openmldb_tool/tests/pytest.xml
285286
286- - name : upload python coverage to codecov
287- uses : codecov/codecov-action @v3
287+ - name : upload coverage
288+ uses : actions/upload-artifact @v3
288289 with :
289- name : coverage-python
290- files : python/openmldb_sdk/tests/coverage.xml,python/openmldb_tool/tests/coverage.xml
291- fail_ci_if_error : true
292- verbose : true
290+ name : coverage-python-report-${{ github.sha }}
291+ path : |
292+ python/openmldb_sdk/tests/coverage.xml
293+ python/openmldb_tool/tests/coverage.xml
294+ retention-days : 3
293295
294296 - name : upload to pypi
295297 if : >
@@ -388,16 +390,12 @@ jobs:
388390 working-directory : go
389391 run : go test ./... -race -covermode=atomic -coverprofile=coverage.out
390392
391- - name : Upload coverage to Codecov
392- uses : codecov/codecov-action @v3
393+ - name : upload coverage
394+ uses : actions/upload-artifact @v3
393395 with :
394- name : coverage-go
395- files : go/coverage.out
396- fail_ci_if_error : true
397- verbose : true
398-
399- - name : stop server
400- run : ./openmldb/sbin/stop-all.sh
396+ name : coverage-go-report-${{ github.sha }}
397+ path : go/coverage.out
398+ retention-days : 3
401399
402400 publish-test-results :
403401 needs : ["java-sdk", "python-sdk", "go-sdk"]
@@ -414,3 +412,37 @@ jobs:
414412 mac-ut-result-*/**/*.xml
415413 check_name : SDK Test Report
416414 comment_title : SDK Test Report
415+
416+ publish-coverage-results :
417+ needs : ["java-sdk", "python-sdk", "go-sdk"]
418+ runs-on : ubuntu-latest
419+ steps :
420+ - uses : actions/checkout@v4
421+ with :
422+ submodules : true
423+
424+ - name : Download Artifacts (java)
425+ uses : actions/download-artifact@v3
426+ with :
427+ name : coverage-java-report-${{ github.sha }}
428+ path : java
429+
430+ - name : Download Artifacts (python)
431+ uses : actions/download-artifact@v3
432+ with :
433+ name : coverage-python-report-${{ github.sha }}
434+ path : python
435+
436+ - name : Download Artifacts (go)
437+ uses : actions/download-artifact@v3
438+ with :
439+ name : coverage-go-report-${{ github.sha }}
440+ path : go
441+
442+ - name : Upload Coverage Report
443+ uses : codecov/codecov-action@v3
444+ with :
445+ files : go/coverage.out,python/openmldb_sdk/tests/coverage.xml,python/openmldb_tool/tests/coverage.xml,java/**/target/site/jacoco/jacoco.xml,java/**/target/scoverage.xml
446+ name : coverage-sdk
447+ fail_ci_if_error : true
448+ verbose : true
0 commit comments