-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
82 lines (65 loc) · 2.63 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# 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
jobs:
####### Test the build on Ubuntu ########
- job: 'Ubuntu_Test'
pool:
vmImage: 'Ubuntu 16.04'
steps:
# Create and activate a Conda environment. See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/conda-environment?view=vsts
- task: CondaEnvironment@1
inputs:
createCustomEnvironment: true
environmentName: test-environment
packageSpecs: 'python=3.6 numpy scipy matplotlib pytest h5py scikit-image pillow cython coverage'
- script: |
sudo add-apt-repository ppa:kivy-team/kivy -y
sudo apt-get update -q || true
sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev -y
sudo apt-get install python-kivy libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev zlib1g-dev -y
- script: |
pip install --user -r requirements.txt
displayName: 'Install dependencies'
- script: pip install --user kivy
displayName: 'Install kivy'
- script: pytest
displayName: 'pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
####### Test the build on Windows ########
- job: 'Windows_Test'
pool:
vmImage: 'vs2017-win2016'
steps:
# Create and activate a Conda environment. See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/conda-environment?view=vsts
- task: CondaEnvironment@1
inputs:
createCustomEnvironment: true
environmentName: test-environment
packageSpecs: 'python=3.6 numpy scipy matplotlib pytest h5py scikit-image pillow cython coverage'
- script: |
pip install -r requirements.txt
pip install -r requirements_windows.txt
displayName: 'Install dependencies'
- script: pip install kivy
displayName: 'Install kivy'
- script: |
conda info
python --version
pip --version
pip list
displayName: 'List installed packages'
- script: copy monkey_patch\config.py C:\Users\VssAdministrator\.conda\envs\test-environment\lib\site-packages\kivy\config.py /Y
displayName: 'Monkey Patch Kivy'
- script: pytest
displayName: 'pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()