commit
43617a8c47
|
@ -5,7 +5,6 @@ trigger:
|
||||||
variables:
|
variables:
|
||||||
PYTEST_ADDOPTS: "--junitxml=build/test-results/$(tox.env).xml -vv"
|
PYTEST_ADDOPTS: "--junitxml=build/test-results/$(tox.env).xml -vv"
|
||||||
python.needs_vc: False
|
python.needs_vc: False
|
||||||
python.exe: "python"
|
|
||||||
COVERAGE_FILE: "$(Build.Repository.LocalPath)/.coverage"
|
COVERAGE_FILE: "$(Build.Repository.LocalPath)/.coverage"
|
||||||
COVERAGE_PROCESS_START: "$(Build.Repository.LocalPath)/.coveragerc"
|
COVERAGE_PROCESS_START: "$(Build.Repository.LocalPath)/.coveragerc"
|
||||||
PYTEST_COVERAGE: '0'
|
PYTEST_COVERAGE: '0'
|
||||||
|
@ -42,15 +41,13 @@ jobs:
|
||||||
# Also seen with py27-nobyte (using xdist), and py27-xdist.
|
# Also seen with py27-nobyte (using xdist), and py27-xdist.
|
||||||
# But no exception with py27-pexpect,py27-twisted,py27-numpy.
|
# But no exception with py27-pexpect,py27-twisted,py27-numpy.
|
||||||
PYTEST_COVERAGE: '1'
|
PYTEST_COVERAGE: '1'
|
||||||
pypy:
|
# -- pypy2 and pypy3 are disabled for now: #5279 --
|
||||||
python.version: 'pypy2'
|
# pypy:
|
||||||
tox.env: 'pypy'
|
# python.version: 'pypy2'
|
||||||
python.exe: 'pypy'
|
# tox.env: 'pypy'
|
||||||
# NOTE: pypy3 fails to install pip currently due to an internal error.
|
|
||||||
# pypy3:
|
# pypy3:
|
||||||
# python.version: 'pypy3'
|
# python.version: 'pypy3'
|
||||||
# tox.env: 'pypy3'
|
# tox.env: 'pypy3'
|
||||||
# python.exe: 'pypy3'
|
|
||||||
py34-xdist:
|
py34-xdist:
|
||||||
python.version: '3.4'
|
python.version: '3.4'
|
||||||
tox.env: 'py34-xdist'
|
tox.env: 'py34-xdist'
|
||||||
|
@ -94,12 +91,12 @@ jobs:
|
||||||
condition: eq(variables['python.needs_vc'], True)
|
condition: eq(variables['python.needs_vc'], True)
|
||||||
displayName: 'Install VC for py27'
|
displayName: 'Install VC for py27'
|
||||||
|
|
||||||
- script: $(python.exe) -m pip install --upgrade pip && $(python.exe) -m pip install tox
|
- script: python -m pip install --upgrade pip && python -m pip install tox
|
||||||
displayName: 'Install tox'
|
displayName: 'Install tox'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
call scripts/setup-coverage-vars.bat || goto :eof
|
call scripts/setup-coverage-vars.bat || goto :eof
|
||||||
$(python.exe) -m tox -e $(tox.env)
|
python -m tox -e $(tox.env)
|
||||||
displayName: 'Run tests'
|
displayName: 'Run tests'
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
|
@ -112,6 +109,5 @@ jobs:
|
||||||
displayName: 'Report and upload coverage'
|
displayName: 'Report and upload coverage'
|
||||||
condition: eq(variables['PYTEST_COVERAGE'], '1')
|
condition: eq(variables['PYTEST_COVERAGE'], '1')
|
||||||
env:
|
env:
|
||||||
PYTHON: $(python.exe)
|
|
||||||
CODECOV_TOKEN: $(CODECOV_TOKEN)
|
CODECOV_TOKEN: $(CODECOV_TOKEN)
|
||||||
PYTEST_CODECOV_NAME: $(tox.env)
|
PYTEST_CODECOV_NAME: $(tox.env)
|
||||||
|
|
|
@ -6,11 +6,11 @@ if "%PYTEST_COVERAGE%" == "1" (
|
||||||
) else (
|
) else (
|
||||||
echo CODECOV_TOKEN NOT defined
|
echo CODECOV_TOKEN NOT defined
|
||||||
)
|
)
|
||||||
%PYTHON% -m pip install codecov
|
python -m pip install codecov
|
||||||
%PYTHON% -m coverage combine
|
python -m coverage combine
|
||||||
%PYTHON% -m coverage xml
|
python -m coverage xml
|
||||||
%PYTHON% -m coverage report -m
|
python -m coverage report -m
|
||||||
scripts\retry %PYTHON% -m codecov --required -X gcov pycov search -f coverage.xml --name %PYTEST_CODECOV_NAME%
|
scripts\retry python -m codecov --required -X gcov pycov search -f coverage.xml --name %PYTEST_CODECOV_NAME%
|
||||||
) else (
|
) else (
|
||||||
echo Skipping coverage upload, PYTEST_COVERAGE=%PYTEST_COVERAGE%
|
echo Skipping coverage upload, PYTEST_COVERAGE=%PYTEST_COVERAGE%
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue