1jobs: 2- job: Test_Nuget 3 displayName: Test Nuget 4 condition: and(succeeded(), eq(variables['DoNuget'], 'true')) 5 6 pool: 7 vmImage: windows-2019 8 9 workspace: 10 clean: all 11 12 strategy: 13 matrix: 14 win32: 15 Package: pythonx86 16 amd64: 17 Package: python 18 19 steps: 20 - checkout: none 21 22 - task: DownloadBuildArtifacts@0 23 displayName: 'Download artifact: nuget' 24 inputs: 25 artifactName: nuget 26 downloadPath: $(Build.BinariesDirectory) 27 28 - task: NugetToolInstaller@0 29 inputs: 30 versionSpec: '>= 5' 31 32 - powershell: > 33 nuget install 34 $(Package) 35 -Source "$(Build.BinariesDirectory)\nuget" 36 -OutputDirectory "$(Build.BinariesDirectory)\install" 37 -Prerelease 38 -ExcludeVersion 39 -NonInteractive 40 displayName: 'Install Python' 41 42 - powershell: | 43 $p = gi "$(Build.BinariesDirectory)\install\$(Package)\tools\python.exe" 44 Write-Host "##vso[task.prependpath]$(Split-Path -Parent $p)" 45 displayName: 'Add test Python to PATH' 46 47 - script: | 48 python -c "import sys; print(sys.version)" 49 displayName: 'Collect version number' 50 51 - script: | 52 python -m site 53 displayName: 'Collect site' 54 55 - script: | 56 python -m pip install "azure<0.10" 57 python -m pip uninstall -y azure python-dateutil six 58 displayName: 'Test (un)install package' 59