mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
30 lines
993 B
YAML
30 lines
993 B
YAML
steps:
|
|
- script: "python -m pip install tox"
|
|
displayName: "Setup Python packages"
|
|
|
|
- pwsh: |
|
|
$toxEnv = '$(python.version)'
|
|
if (-not $toxEnv.startsWith('pypy')) {
|
|
$toxEnv = 'py' + $toxEnv.Replace('.', '')
|
|
}
|
|
echo 'tox environment: $toxEnv'
|
|
python -m tox -e $toxEnv -- --junitxml=$(Build.ArtifactStagingDirectory)/tests.xml --debugpy-log-dir=$(Build.ArtifactStagingDirectory)/logs tests
|
|
displayName: "Run tests using tox"
|
|
env:
|
|
DEBUGPY_PROCESS_SPAWN_TIMEOUT: 60
|
|
DEBUGPY_LAUNCH_TIMEOUT: 60
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
condition: failed()
|
|
inputs:
|
|
artifactName: "Test logs"
|
|
pathToPublish: "$(Build.ArtifactStagingDirectory)/logs"
|
|
displayName: "Publish test logs"
|
|
|
|
- task: PublishTestResults@2
|
|
condition: always()
|
|
inputs:
|
|
testRunTitle: "$(Agent.JobName)"
|
|
testResultsFiles: "tests.xml"
|
|
searchFolder: "$(Build.ArtifactStagingDirectory)"
|
|
displayName: "Publish test results"
|