debugpy/tests.yaml
2020-01-21 21:03:11 -08:00

223 lines
6.6 KiB
YAML

jobs:
- job: 'Lint'
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '>=3.7'
- script: 'python -m pip install -U pip setuptools tox flake8'
displayName: 'Setup Python packages'
- script: 'python -m pip install git+https://github.com/karthiknadig/flake8reports'
displayName: 'Acquire Linter Plugin flake8reports'
- script: 'python -m flake8 --format=junit --output-file=$(Build.ArtifactStagingDirectory)/linter-test.xml'
displayName: 'Run Lint'
- task: PublishTestResults@2
displayName: 'Publish Linter Results'
inputs:
testResultsFiles: '**/linter-test.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)'
testRunTitle: 'Linux-Linter-$(Build.BuildNumber)'
buildPlatform: Linux
buildConfiguration: Lint
condition: always()
- job: 'Linux Test Run'
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python27:
python.version: '2.7'
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
maxParallel: 5
steps:
- script: |
sudo apt-get --yes install gdb
sudo sysctl kernel.yama.ptrace_scope=0
displayName: 'install gdb'
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: 'python -m pip install -U pip setuptools tox'
displayName: 'Setup Python packages'
- powershell: |
$toxEnv = '$(python.version)'
if ($toxEnv.startsWith('pypy')){
}else{
$toxEnv = 'py' + $toxEnv.Replace('.', '')
}
echo $toxEnv
python -m tox -e $toxEnv -- -vv --junitxml=$(Build.ArtifactStagingDirectory)/junit-test-report-linux-pytest.xml
displayName: 'Run Tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**/junit-test-report-*.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)'
testRunTitle: 'Linux-Unit-Py$(python.version)-$(Build.BuildNumber)'
buildPlatform: Linux
buildConfiguration: UnitTest
condition: always()
- job: 'macOS Test Run'
pool:
vmImage: 'macOS-10.13'
strategy:
matrix:
Python27:
python.version: '2.7'
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
maxParallel: 5
steps:
- script: |
ulimit -Sn 8192
displayName: 'Increase file descriptor limit'
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: |
python -m ensurepip --user
python -m pip install --user --upgrade pip
python -m pip install --user setuptools tox
displayName: 'Ensure Pip and Setup Python packages'
- powershell: |
$toxEnv = '$(python.version)'
if ($toxEnv.startsWith('pypy')){
}else{
$toxEnv = 'py' + $toxEnv.Replace('.', '')
}
echo $toxEnv
python -m tox -e $toxEnv -- -vv --junitxml=$(Build.ArtifactStagingDirectory)/junit-test-report-mac-pytest.xml
displayName: 'Run Tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**/junit-test-report-*.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)'
testRunTitle: 'macOS-Unit-Py$(python.version)-$(Build.BuildNumber)'
buildPlatform: macOS
buildConfiguration: UnitTest
condition: always()
- job: 'Windows Test Run'
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
Python27:
python.version: '2.7'
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
maxParallel: 5
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: 'python -m pip install -U pip setuptools tox'
displayName: 'Setup Python packages'
- powershell: |
$toxEnv = '$(python.version)'
if ($toxEnv.startsWith('pypy')){
}else{
$toxEnv = 'py' + $toxEnv.Replace('.', '')
}
echo $toxEnv
python -m tox -e $toxEnv -- -vv --junitxml=$(Build.ArtifactStagingDirectory)/junit-test-report-win-pytest.xml
displayName: 'Run Tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**/junit-test-report-*.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)'
testRunTitle: 'Win-Unit-Py$(python.version)-$(Build.BuildNumber)'
buildPlatform: Windows
buildConfiguration: UnitTest
condition: always()
- job: 'Windows 32bit Test Run'
pool:
vmImage: 'vs2017-win2016'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: 3.7
architecture: x86
- script: 'python -m pip install -U pip setuptools tox'
displayName: 'Setup Python packages'
- powershell: |
$toxEnv = '$(python.version)'
if ($toxEnv.startsWith('pypy')){
}else{
$toxEnv = 'py' + $toxEnv.Replace('.', '')
}
echo $toxEnv
python -m tox -e $toxEnv -- -vv --junitxml=$(Build.ArtifactStagingDirectory)/junit-test-report-win-pytest.xml
displayName: 'Run Tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '**/junit-test-report-*.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)'
testRunTitle: 'Win32-Unit-Py$(python.version)-$(Build.BuildNumber)'
buildPlatform: Windows
buildConfiguration: UnitTest
condition: always()