Skip to content
Open
2 changes: 1 addition & 1 deletion atest/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def sauce_credentials(sauce_username, sauce_key):
if args.nounit:
print('Not running unit tests.')
else:
rc = subprocess.call([interpreter, UNIT_TEST_RUNNER])
rc = subprocess.call([interpreter, UNIT_TEST_RUNNER], shell=(os.name == 'nt'))
if rc != 0:
print('Not running acceptance test, because unit tests failed.')
sys.exit(rc)
Expand Down
65 changes: 65 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
#
# See https://github.com/Microsoft/azure-pipelines-tasks/issues/8798 for the solution to download files

jobs:

- job: 'Test'
pool:
vmImage: 'macOS-10.13' # other options: 'macOS-10.13', 'Ubuntu 16.04', 'vs2017-win2016'
strategy:
matrix:
Python27:
browser: 'chrome'
robot.options: '--xunit results.xml --xunitskipnoncritical --dotted'
python.version: '2.7'
Python36:
browser: 'firefox'
robot.options: '--xunit results.xml --xunitskipnoncritical --dotted'
python.version: '3.6'
Python37:
browser: 'chrome'
robot.options: '--xunit results.xml --xunitskipnoncritical --dotted'
python.version: '3.7'
maxParallel: 3

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: python -m pip install --upgrade pip && pip install robotstatuschecker && pip install -r requirements-dev.txt && webdrivermanager -d /Users/vsts/bin $(browser)
displayName: 'Install dependencies'

- script: |
export PATH=$(PATH):/Users/vsts/bin
echo $(PATH) $PATH
displayName: 'Add webdriver to PATH'

- script: |
python atest/run.py $(browser) --interpreter python $(robot.options)
displayName: 'acceptance tests'

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/atest/results/results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()

- job: 'Publish'
dependsOn: 'Test'
pool:
vmImage: 'macOS-10.13'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'

- script: python setup.py sdist
displayName: 'Build sdist'
60 changes: 60 additions & 0 deletions azure-pipelines_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
#
# See https://github.com/Microsoft/azure-pipelines-tasks/issues/8798 for the solution to download files

jobs:

- job: 'Test'
pool:
vmImage: 'vs2017-win2016' # other options: 'macOS-10.13', 'Ubuntu 16.04', 'vs2017-win2016'
strategy:
matrix:
Python27:
browser: 'Chrome'
robot.options: '--xunit results.xml --xunitskipnoncritical --dotted'
python.version: '2.7'
Python36:
browser: 'Firefox'
robot.options: '--xunit results.xml --xunitskipnoncritical --dotted'
python.version: '3.6'
Python37:
browser: 'Ie'
robot.options: '--xunit results.xml --xunitskipnoncritical --dotted'
python.version: '3.7'
maxParallel: 3

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: python -m pip install --upgrade pip && pip install robotstatuschecker && pip install -r requirements-dev.txt
displayName: 'Install dependencies'

- script: |
python atest/run.py $(browser) --interpreter python $(robot.options)
displayName: 'acceptance tests'

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/atest/results/results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()

- job: 'Publish'
dependsOn: 'Test'
pool:
vmImage: 'vs2017-win2016'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'

- script: python setup.py sdist
displayName: 'Build sdist'
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
mockito >= 1.0.0
robotstatuschecker
approvaltests >= 0.2.4
webdrivermanager >= 0.5.0

# Include normal dependencies from requirements.txt. Makes it possible to use
# requirements-dev.txt as a single requirement file in PyCharm and other IDEs.
Expand Down