2019-02-27 06:22:23 +08:00
|
|
|
REM script called by Azure to combine and upload coverage information to codecov
|
|
|
|
if "%PYTEST_COVERAGE%" == "1" (
|
2018-09-02 21:22:20 +08:00
|
|
|
echo Prepare to upload coverage information
|
2019-02-26 07:27:45 +08:00
|
|
|
if defined CODECOV_TOKEN (
|
|
|
|
echo CODECOV_TOKEN defined
|
|
|
|
) else (
|
|
|
|
echo CODECOV_TOKEN NOT defined
|
|
|
|
)
|
2019-03-02 07:50:31 +08:00
|
|
|
%PYTHON% -m pip install codecov
|
|
|
|
%PYTHON% -m coverage combine
|
|
|
|
%PYTHON% -m coverage xml
|
|
|
|
%PYTHON% -m coverage report -m
|
|
|
|
scripts\retry %PYTHON% -m codecov --required -X gcov pycov search -f coverage.xml --name %PYTEST_CODECOV_NAME%
|
2018-09-02 21:22:20 +08:00
|
|
|
) else (
|
2019-02-27 06:22:23 +08:00
|
|
|
echo Skipping coverage upload, PYTEST_COVERAGE=%PYTEST_COVERAGE%
|
2018-09-02 21:22:20 +08:00
|
|
|
)
|