diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f651be72fb..6d9e4b5800 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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: @@ -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 @@ -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' diff --git a/ci/requirements-py27.yml b/ci/requirements-py27.yml index cb77db8ca4..12dde97000 100644 --- a/ci/requirements-py27.yml +++ b/ci/requirements-py27.yml @@ -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 diff --git a/ci/requirements-py34.yml b/ci/requirements-py34.yml index 870ddebd39..93efa85ebf 100644 --- a/ci/requirements-py34.yml +++ b/ci/requirements-py34.yml @@ -14,8 +14,8 @@ dependencies: - siphon - pytest - pytest-cov - - pytest-mock - nose - pip: - coveralls + - pytest-mock - pytest-timeout diff --git a/ci/requirements-py35.yml b/ci/requirements-py35.yml index 7c4d0ff35f..fdbde57f58 100644 --- a/ci/requirements-py35.yml +++ b/ci/requirements-py35.yml @@ -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 diff --git a/ci/requirements-py36.yml b/ci/requirements-py36.yml index 068e0bd534..dfcff39773 100644 --- a/ci/requirements-py36.yml +++ b/ci/requirements-py36.yml @@ -14,8 +14,9 @@ dependencies: - siphon - pytest - pytest-cov - - pytest-mock - nose + - shapely # pvfactors dependency - pip: - coveralls + - pytest-mock - pvfactors==0.1.5 diff --git a/ci/requirements-py37.yml b/ci/requirements-py37.yml index 11378ba272..527bf91142 100644 --- a/ci/requirements-py37.yml +++ b/ci/requirements-py37.yml @@ -14,8 +14,9 @@ dependencies: # - siphon - pytest - pytest-cov - - pytest-mock - nose + - shapely # pvfactors dependency - pip: - coveralls + - pytest-mock - pvfactors==0.1.5