From f22b8e7edda43f9460c899b2d804c4e8aaff2016 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 31 Jan 2020 12:10:17 -0800 Subject: [PATCH] Coverage for windows and linux --- azure-pipelines/linux_coverage.yaml | 12 ++++++++++++ azure-pipelines/templates/coverage.yml | 19 +++++++++++++++++++ azure-pipelines/win-coverage.yaml | 12 ++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 azure-pipelines/linux_coverage.yaml create mode 100644 azure-pipelines/templates/coverage.yml create mode 100644 azure-pipelines/win-coverage.yaml 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"