
parameters:
  name: ''
  vmImage: ''
  matrix: []

jobs:
- job: ${{ parameters.name }}
  pool:
    vmImage: ${{ parameters.vmImage }}

  strategy:
    matrix:
      ${{ insert }}: ${{ parameters.matrix }}

  steps:
    - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
      displayName: Add conda to PATH
    - script: |
        continuous_integration\\install.cmd
      displayName: 'Install'
    - script: |
        continuous_integration\\test_script.cmd
      displayName: 'Test threadpoolctl'
    - task: PublishTestResults@2
      inputs:
        testResultsFiles: '$(JUNITXML)'
        testRunTitle: ${{ format('{0}-$(Agent.JobName)', parameters.name) }}
      displayName: 'Publish Test Results'
      condition: succeededOrFailed()
    - publish: $(JUNITXML)
    - script: |
        bash continuous_integration\\upload_codecov.sh
      displayName: 'Upload to codecov'
      condition: succeeded()
