queue:
  name: Hosted Ubuntu 1604
  timeoutInMinutes: 6000

trigger:
  batch: true
  branches:
    include:
    - master

variables:
  python.version: '3.7'

steps:

- task: UsePythonVersion@0
  displayName: 'Use Python $(python.version)'
  inputs:
    versionSpec: '$(python.version)'

- script: 'git submodule update --init'
  displayName: 'Fetch submodules'

- script: 'azure/install_dependencies.sh && pip install nose coverage codecov'
  displayName: 'Install dependencies'

- script: './download.sh'
  displayName: 'Download data files'

- script: 'python setup.py nosetests'
  displayName: Unit tests

- script: 'codecov -t $(codecov.token)'
  displayName: Upload coverage
