# 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/vsts/pipelines/languages/python

jobs:

- job: 'Test'
  pool:
    vmImage: 'vs2017-win2016'
  strategy:
    matrix:
      Python27:
        python.version: '2.7'
      Python36:
        python.version: '3.6'
      Python37:
        python.version: '3.7'
    maxParallel: 4

  steps:
  - task: UsePythonVersion@0
    inputs:
      versionSpec: '$(python.version)'
      architecture: 'x64'

  - script: |
      python -m pip install --upgrade pip 
      pip install matplotlib numpy scipy
      pip install pyqt
      pip install nose six coveralls flake8 mock==1.0.1
    displayName: 'Install dependencies'

  - script: flake8 colour
    displayName: 'flake8'

  - script: nosetests --nocapture --with-doctest --doctest-options=+ELLIPSIS --with-coverage --cover-package=colour --with-xunit colour
    displayName: 'nosetest'

  - task: PublishTestResults@2
    inputs:
      testResultsFiles: '**/nosetests.xml'
      testRunTitle: 'Python $(python.version)'
    condition: succeededOrFailed()

Set up CI with Azure Pipelines.
Set up CI with Azure Pipelines.
