parameters: 
  RunCoverage: false

steps:

  - script: |
      codecov -t $(codecov-python-repository-token)
    displayName: 'Publish Code Cov'
    continueOnError: true
    condition: and(ne(variables['codecov-python-repository-token'], ''), succeededOrFailed(), ${{ parameters.RunCoverage }})

  - task: PublishCodeCoverageResults@1
    displayName: 'Publish Code Coverage to DevOps'
    continueOnError: true
    condition: and(succeededOrFailed(), ${{ parameters.RunCoverage }})
    inputs:
      codeCoverageTool: Cobertura
      summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml'
