summaryrefslogtreecommitdiff
path: root/azure-pipelines.yml
diff options
context:
space:
mode:
Diffstat (limited to 'azure-pipelines.yml')
-rw-r--r--azure-pipelines.yml72
1 files changed, 72 insertions, 0 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 0000000..6d31899
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,72 @@
+# Create the project in Azure with:
+# az devops project create --name $name --organization https://dev.azure.com/$org/ --visibility public
+# then configure the pipelines (through web UI)
+
+trigger:
+ branches:
+ include:
+ - '*'
+ tags:
+ include:
+ - '*'
+
+pool:
+ vmImage: $(pool_vm_image)
+
+variables:
+- group: Azure secrets
+- name: pool_vm_image
+ value: Ubuntu-18.04
+
+stages:
+- stage: Test
+ jobs:
+
+ - job: 'Test'
+ strategy:
+ matrix:
+ Bionic Python 3.6:
+ python.version: '3.6'
+ Bionic Python 3.8:
+ python.version: '3.8'
+ Windows Python 3.8:
+ python.version: '3.8'
+ pool_vm_image: vs2017-win2016
+ Windows Python Prerelease:
+ python.version: '3.9'
+ pool_vm_image: vs2017-win2016
+ MacOS:
+ python.version: '3.8'
+ pool_vm_image: macos-10.15
+
+ maxParallel: 4
+
+ steps:
+ - task: NuGetToolInstaller@1
+ displayName: 'Install NuGet'
+ condition: eq(variables['pool_vm_image'], 'vs2017-win2016')
+
+ - powershell: |
+ nuget install python -Prerelease -OutputDirectory "$(Build.BinariesDirectory)" -ExcludeVersion -NonInteractive
+ Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)\python\tools"
+ Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)\python\tools\Scripts"
+ condition: and(succeeded(), and(eq(variables['python.version'], '3.9'), eq(variables['pool_vm_image'], 'vs2017-win2016')))
+
+ - task: UsePythonVersion@0
+ inputs:
+ versionSpec: '$(python.version)'
+ architecture: 'x64'
+ condition: and(succeeded(), ne(variables['python.version'], '3.9'))
+
+ - script: python -m pip install tox
+ displayName: 'Install tox'
+
+ - script: |
+ tox -- --junit-xml=test-results.xml
+ displayName: 'run tests'
+
+ - task: PublishTestResults@2
+ inputs:
+ testResultsFiles: '**/test-results.xml'
+ testRunTitle: 'Python $(python.version)'
+ condition: succeededOrFailed()