Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit efdd436

Browse files
zoobaanntzer
authored andcommitted
Adds macOS and Windows builds to Azure Pipelines
1 parent 93b80e2 commit efdd436

File tree

2 files changed

+72
-30
lines changed

2 files changed

+72
-30
lines changed

azure-pipelines.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
jobs:
77

8-
- job: 'Test'
8+
- job: 'Linux tests'
99
pool:
10-
vmImage: 'Ubuntu 16.04'
10+
vmImage: ubuntu-16.04
1111
strategy:
1212
matrix:
1313
Python36:
@@ -17,35 +17,35 @@ jobs:
1717
maxParallel: 4
1818

1919
steps:
20-
- task: UsePythonVersion@0
21-
inputs:
22-
versionSpec: '$(python.version)'
23-
architecture: 'x64'
20+
- template: ci/azure-pipelines-steps.yml
2421

25-
- script: |
26-
27-
python -m pip install --upgrade pip
28-
pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
29-
30-
displayName: 'Install dependencies'
31-
32-
- script: |
33-
34-
export MPLLOCALFREETYPE=1
35-
pip install -ve .
36-
37-
displayName: "Install self"
22+
- job: 'Windows tests'
23+
pool:
24+
vmImage: win2016-vs2017
25+
strategy:
26+
matrix:
27+
Python36:
28+
python.version: '3.6'
29+
Python37:
30+
python.version: '3.7'
31+
# Disabled until a required extension is installed
32+
#PythonPreview:
33+
# python.version: 'Pre'
34+
maxParallel: 4
3835

39-
- script: env
40-
displayName: 'print env'
36+
steps:
37+
- template: ci/azure-pipelines-steps.yml
4138

42-
- script: |
43-
env
44-
pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2
45-
displayName: 'pytest'
39+
- job: 'macOS tests'
40+
pool:
41+
vmImage: xcode9-macos10.13
42+
strategy:
43+
matrix:
44+
Python36:
45+
python.version: '3.6'
46+
Python37:
47+
python.version: '3.7'
48+
maxParallel: 4
4649

47-
- task: PublishTestResults@2
48-
inputs:
49-
testResultsFiles: '**/test-results.xml'
50-
testRunTitle: 'Python $(python.version)'
51-
condition: succeededOrFailed()
50+
steps:
51+
- template: ci/azure-pipelines-steps.yml

ci/azure-pipelines-steps.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
steps:
2+
- task: UsePythonVersion@0
3+
inputs:
4+
versionSpec: '$(python.version)'
5+
architecture: 'x64'
6+
displayName: 'Use Python $(python.version)'
7+
condition: and(succeeded(), ne(variables['python.version'], 'Pre'))
8+
9+
- task: stevedower.python.InstallPython.InstallPython@1
10+
displayName: 'Use prerelease Python'
11+
inputs:
12+
prerelease: true
13+
condition: and(succeeded(), eq(variables['python.version'], 'Pre'))
14+
15+
- script: |
16+
17+
python -m pip install --upgrade pip
18+
pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
19+
20+
displayName: 'Install dependencies'
21+
22+
- script: |
23+
24+
pip install -ve .
25+
26+
displayName: "Install self"
27+
env:
28+
MPLLOCALFREETYPE: 1
29+
30+
- script: env
31+
displayName: 'print env'
32+
33+
- script: |
34+
env
35+
pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2
36+
displayName: 'pytest'
37+
38+
- task: PublishTestResults@2
39+
inputs:
40+
testResultsFiles: '**/test-results.xml'
41+
testRunTitle: 'Python $(python.version)'
42+
condition: succeededOrFailed()

0 commit comments

Comments
 (0)