Files
pipenv/.azure-pipelines/steps/run-tests.yml
Dan Ryan a63fd73de8 Fix azure pipelines invocation
Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-03-20 22:31:35 -04:00

29 lines
1.1 KiB
YAML

steps:
- powershell: |
# Fix Git SSL errors
Invoke-Expression "& '$env:VIRTUAL_ENV_PY' -m pip install certifi"
Invoke-Expression "& '$env:VIRTUAL_ENV_PY' -m certifi > cacert.txt"
Write-Host "##vso[task.setvariable variable=GIT_SSL_CAINFO]$(Get-Content cacert.txt)"
$env:GIT_SSL_CAINFO="$(Get-Content cacert.txt)"
# Shorten paths to get under MAX_PATH or else integration tests will fail
# https://bugs.python.org/issue18199
subst T: "$env:TEMP"
Write-Host "##vso[task.setvariable variable=TEMP]T:\"
$env:TEMP='T:\'
Write-Host "##vso[task.setvariable variable=TMP]T:\"
$env:TMP='T:\'
git submodule sync
git submodule update --init --recursive
Invoke-Expression "& '$env:VIRTUAL_ENV_PY' -m pipenv run pytest -ra --ignore=pipenv\patched --ignore=pipenv\vendor --junitxml=test-results.xml tests"
displayName: Run integration tests
env:
VIRTUAL_ENV: $(VIRTUAL_ENV)
VIRTUAL_ENV_PY: $(VIRTUAL_ENV_PY)
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()