Skip to content

azure pipelines config #715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 55 additions & 16 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# 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

trigger:
- master


jobs:

- job: 'Test_conda'
- job: 'Test_conda_linux'

pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-16.04'

strategy:
matrix:
Python27:
Expand All @@ -19,21 +19,20 @@ jobs:
python.version: '35'
Python36:
python.version: '36'
coverage: true
Python37:
python.version: '37'

steps:
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH

- script: conda env create --quiet --file ci/requirements-py$(python.version).yml
displayName: Create Anaconda environment

- script: |
source activate test_env
pip install pytest pytest-azurepipelines
pip install -e .
displayName: 'pip dependencies'

- script: |
source activate test_env
conda list
Expand All @@ -42,28 +41,68 @@ jobs:
source activate test_env
pytest pvlib --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
displayName: 'pytest'
- script: |
source activate test_env
flake8 pvlib
displayName: 'flake8'
# - script: |
# source activate test_env
# flake8 pvlib
# displayName: 'flake8'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'

testRunTitle: 'Linux $(python.version)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'

condition: eq(variables['coverage'], true)
- script: |
bash <(curl https://codecov.io/bash) -t bbc2bdbe-5e67-4fef-9cb7-f52fe0b703a8 -f coverage.xml -F adder -F subtractor -F conda
displayName: 'codecov'
condition: eq(variables['coverage'], true)


- job: 'Test_conda_windows'

pool:
vmImage: 'vs2017-win2016'

strategy:
matrix:
Python27-windows:
python.version: '27'
Python35-windows:
python.version: '35'
Python36-windows:
python.version: '36'
Python37-windows:
python.version: '37'

steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: conda env create --quiet --file ci/requirements-py$(python.version).yml
displayName: Create Anaconda environment
- script: |
call activate myEnvironment
pip install pytest pytest-azurepipelines pytest-mock
pip install -e .
displayName: 'pip dependencies'
- script: |
call activate myEnvironment
conda list
displayName: 'List installed dependencies'
- script: |
call activate myEnvironment
pytest pvlib --junitxml=junit/test-results.xml
displayName: 'pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Windows $(python.version)'


- job: 'Publish'
dependsOn: 'Test_conda'
dependsOn: 'Test_conda_linux'
pool:
vmImage: 'ubuntu-latest'

Expand Down
3 changes: 2 additions & 1 deletion ci/requirements-py27.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ dependencies:
- siphon
- pytest
- pytest-cov
- pytest-mock
- nose
- shapely # pvfactors dependency
- pip:
- coveralls
- pytest-mock
- pytest-timeout
- pvfactors==0.1.5
2 changes: 1 addition & 1 deletion ci/requirements-py34.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ dependencies:
- siphon
- pytest
- pytest-cov
- pytest-mock
- nose
- pip:
- coveralls
- pytest-mock
- pytest-timeout
3 changes: 2 additions & 1 deletion ci/requirements-py35.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ dependencies:
- siphon
- pytest
- pytest-cov
- pytest-mock
- nose
- shapely # pvfactors dependency
- pip:
- coveralls
- pytest-mock
- pytest-timeout
- pvfactors==0.1.5
3 changes: 2 additions & 1 deletion ci/requirements-py36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ dependencies:
- siphon
- pytest
- pytest-cov
- pytest-mock
- nose
- shapely # pvfactors dependency
- pip:
- coveralls
- pytest-mock
- pvfactors==0.1.5
3 changes: 2 additions & 1 deletion ci/requirements-py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ dependencies:
# - siphon
- pytest
- pytest-cov
- pytest-mock
- nose
- shapely # pvfactors dependency
- pip:
- coveralls
- pytest-mock
- pvfactors==0.1.5