@@ -6,169 +6,28 @@ trigger:
6
6
7
7
jobs :
8
8
9
- - job : ' Test_bare_linux'
9
+ - template : ci/azure/posix.yml
10
+ parameters :
11
+ name : Test_bare_Linux
12
+ vmImage : ubuntu-16.04
10
13
11
- pool :
12
- vmImage : ' ubuntu-16.04'
13
- strategy :
14
- matrix :
15
- Python35 :
16
- python.version : ' 3.5'
17
- Python36 :
18
- python.version : ' 3.6'
19
- Python37 :
20
- python.version : ' 3.7'
21
-
22
- steps :
23
- - task : UsePythonVersion@0
24
- inputs :
25
- versionSpec : ' $(python.version)'
26
-
27
- - script : |
28
- pip install pytest pytest-cov pytest-mock pytest-timeout pytest-azurepipelines
29
- pip install -e .
30
- pytest pvlib --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
31
- displayName: 'Test with pytest'
32
-
33
- - task : PublishTestResults@2
34
- condition : succeededOrFailed()
35
- inputs :
36
- testResultsFiles : ' **/test-*.xml'
37
- testRunTitle : ' Publish test results for Python $(python.version)'
38
-
39
- - task : PublishCodeCoverageResults@1
40
- inputs :
41
- codeCoverageTool : Cobertura
42
- summaryFileLocation : ' $(System.DefaultWorkingDirectory)/**/coverage.xml'
43
- reportDirectory : ' $(System.DefaultWorkingDirectory)/**/htmlcov'
44
14
15
+ - template : ci/azure/posix.yml
16
+ parameters :
17
+ name : Test_bare_macOS
18
+ vmImage : macOS-10.14
45
19
46
- - job : ' Test_conda_linux'
47
20
48
- pool :
49
- vmImage : ' ubuntu-16.04'
21
+ - template : ci/azure/conda_linux.yml
22
+ parameters :
23
+ name : Test_conda_linux
24
+ vmImage : ubuntu-16.04
50
25
51
- strategy :
52
- matrix :
53
- Python35 :
54
- python.version : ' 35'
55
- Python36 :
56
- python.version : ' 36'
57
- coverage : true
58
- Python37 :
59
- python.version : ' 37'
60
26
61
- steps :
62
- - bash : echo "##vso[task.prependpath]/usr/share/miniconda/bin"
63
- displayName : Add conda to PATH
64
- - script : conda env create --quiet --file ci/requirements-py$(python.version).yml
65
- displayName : Create Anaconda environment
66
- - script : |
67
- source activate test_env
68
- pip install pytest-azurepipelines
69
- pip install -e .
70
- displayName: 'pip dependencies'
71
- - script : |
72
- source activate test_env
73
- conda list
74
- displayName: 'List installed dependencies'
75
- - script : |
76
- source activate test_env
77
- pytest pvlib --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
78
- displayName: 'pytest'
79
- # - script: |
80
- # source activate test_env
81
- # flake8 pvlib
82
- # displayName: 'flake8'
83
- - task : PublishTestResults@2
84
- inputs :
85
- testResultsFiles : ' **/test-results.xml'
86
- testRunTitle : ' Linux $(python.version)'
87
- - task : PublishCodeCoverageResults@1
88
- inputs :
89
- codeCoverageTool : Cobertura
90
- summaryFileLocation : ' $(System.DefaultWorkingDirectory)/**/coverage.xml'
91
- reportDirectory : ' $(System.DefaultWorkingDirectory)/**/htmlcov'
92
- condition : eq(variables['coverage'], true)
93
- - script : |
94
- bash <(curl https://codecov.io/bash) -t bbc2bdbe-5e67-4fef-9cb7-f52fe0b703a8 -f coverage.xml -F adder -F subtractor -F conda
95
- displayName: 'codecov'
96
- condition: eq(variables['coverage'], true)
97
-
98
-
99
- - job : ' Test_conda_windows'
100
-
101
- pool :
102
- vmImage : ' vs2017-win2016'
103
-
104
- strategy :
105
- matrix :
106
- Python35-windows :
107
- python.version : ' 35'
108
- Python36-windows :
109
- python.version : ' 36'
110
- Python37-windows :
111
- python.version : ' 37'
112
-
113
- steps :
114
- - powershell : Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
115
- displayName : Add conda to PATH
116
- - script : conda env create --quiet --file ci/requirements-py$(python.version).yml
117
- displayName : Create Anaconda environment
118
- - script : |
119
- call activate test_env
120
- pip install pytest-azurepipelines
121
- pip install -e .
122
- displayName: 'pip dependencies'
123
- - script : |
124
- call activate test_env
125
- conda list
126
- displayName: 'List installed dependencies'
127
- - script : |
128
- call activate test_env
129
- pytest pvlib --junitxml=junit/test-results.xml
130
- displayName: 'pytest'
131
- - task : PublishTestResults@2
132
- inputs :
133
- testResultsFiles : ' **/test-results.xml'
134
- testRunTitle : ' Windows $(python.version)'
135
-
136
-
137
- - job : ' Test_bare_macOS_Mojave'
138
-
139
- pool :
140
- vmImage : ' macOS-10.14'
141
- strategy :
142
- matrix :
143
- Python35 :
144
- python.version : ' 3.5'
145
- Python36 :
146
- python.version : ' 3.6'
147
- Python37 :
148
- python.version : ' 3.7'
149
-
150
- steps :
151
- - task : UsePythonVersion@0
152
- inputs :
153
- versionSpec : ' $(python.version)'
154
-
155
- - script : |
156
- pip install pytest pytest-cov pytest-mock pytest-timeout pytest-azurepipelines
157
- pip install -e .
158
- pytest pvlib/test --junitxml=junit/test-results.xml --cov=pvlib --cov-report=xml --cov-report=html
159
- displayName: 'Test with pytest'
160
-
161
- - task : PublishTestResults@2
162
- condition : succeededOrFailed()
163
- inputs :
164
- testResultsFiles : ' **/test-*.xml'
165
- testRunTitle : ' Publish test results for Python $(python.version)'
166
-
167
- - task : PublishCodeCoverageResults@1
168
- inputs :
169
- codeCoverageTool : Cobertura
170
- summaryFileLocation : ' $(System.DefaultWorkingDirectory)/**/coverage.xml'
171
- reportDirectory : ' $(System.DefaultWorkingDirectory)/**/htmlcov'
27
+ - template : ci/azure/conda_windows.yml
28
+ parameters :
29
+ name : Test_conda_windows
30
+ vmImage : vs2017-win2016
172
31
173
32
174
33
- job : ' Publish'
0 commit comments