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