diff --git a/azure-pipelines/linux_coverage.yaml b/azure-pipelines/linux_coverage.yaml new file mode 100644 index 00000000..5bf2fefb --- /dev/null +++ b/azure-pipelines/linux_coverage.yaml @@ -0,0 +1,12 @@ +variables: + architecture: "x64" + python.version: "3.8" + +jobs: + - job: 'Coverage' + pool: + name: Azure Pipelines + demands: java + vmImage: "ubuntu-16.04" + steps: + - template: "azure-pipelines/templates/coverage.yml" \ No newline at end of file diff --git a/azure-pipelines/templates/coverage.yml b/azure-pipelines/templates/coverage.yml new file mode 100644 index 00000000..fa7cf199 --- /dev/null +++ b/azure-pipelines/templates/coverage.yml @@ -0,0 +1,19 @@ +steps: + - template: "azure-pipelines/templates/use_python.yml" + + - script: | + python -m pip install -U pip setuptools tox + displayName: 'Setup Python packages' + + - script: | + python -m tox --develop -e py38-cov -- --cov-report=html --cov-report=xml -vv + displayName: 'Coverage Run' + + - task: PublishCodeCoverageResults@1 + displayName: 'Publish Coverage Report' + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: '$(Build.SourcesDirectory)/**/coverage/coverage.xml' + reportDirectory: '$(Build.SourcesDirectory)/**/coverage/html' + failIfCoverageEmpty: true + condition: always() \ No newline at end of file diff --git a/azure-pipelines/win-coverage.yaml b/azure-pipelines/win-coverage.yaml new file mode 100644 index 00000000..4c39d9bf --- /dev/null +++ b/azure-pipelines/win-coverage.yaml @@ -0,0 +1,12 @@ +variables: + architecture: "x64" + python.version: "3.8" + +jobs: + - job: 'Coverage' + pool: + name: Azure Pipelines + demands: java + vmImage: "vs2017-win2016" + steps: + - template: "azure-pipelines/templates/coverage.yml"