File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ jobs:
263263 pip install setuptools wheel twine
264264 yum install -y net-tools
265265
266- - name : test sqlalchemy
266+ - name : test sqlalchemy and generate coverage report
267267 run : |
268268 bash steps/test_python.sh
269269
@@ -275,6 +275,14 @@ jobs:
275275 path : |
276276 python/openmldb/test/pytest.xml
277277
278+ - name : upload python coverage to codecov
279+ uses : codecov/codecov-action@v2
280+ with :
281+ name : coverage
282+ files : python/test/coverage.xml
283+ fail_ci_if_error : true
284+ verbose : true
285+
278286 - name : upload to pypi
279287 if : >
280288 github.repository == '4paradigm/OpenMLDB' && startsWith(github.ref, 'refs/tags/v')
Original file line number Diff line number Diff line change @@ -43,8 +43,9 @@ cd "${ROOT_DIR}"/python/dist/
4343whl_name=$( ls openmldb* .whl)
4444echo " whl_name:${whl_name} "
4545python3 -m pip install " ${whl_name} " -i https://pypi.tuna.tsinghua.edu.cn/simple
46+ python3 -m pip install pytest-cov
4647
4748cd " ${ROOT_DIR} " /python/test
48- pytest -vv --junit-xml=pytest.xml
49+ pytest -vv --junit-xml=pytest.xml --cov=./ --cov-report=xml
4950cd " ${ROOT_DIR} " /onebox && sh stop_all.sh && cd " $ROOT_DIR "
5051cd " $THIRDSRC /zookeeper-3.4.14" && ./bin/zkServer.sh stop && cd " $ROOT_DIR "
You can’t perform that action at this time.
0 commit comments