From 48c596ea2b63a7f4bbaa1f3de745ee0be0dfb24c Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Mon, 22 Jul 2019 15:19:37 +1000 Subject: [PATCH 1/2] Adding codecov for coverage reporting --- .azure-pipelines/test.yml | 8 +++++++- azure-pipelines.pr.yml | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/test.yml b/.azure-pipelines/test.yml index 80d4e1c..b6a5c58 100755 --- a/.azure-pipelines/test.yml +++ b/.azure-pipelines/test.yml @@ -27,6 +27,12 @@ steps: inputs: codeCoverageTool: 'cobertura' summaryFileLocation: coverage/cobertura-coverage.xml + reportDirectory: coverage/lcov-report + condition: succeededOrFailed() + + - script: | + bash <(curl https://codecov.io/bash) -t $(CODECOV_TOKEN) -f coverage/cobertura-coverage.xml + displayName: 'codecov' condition: succeededOrFailed() - task: CopyFiles@2 @@ -39,4 +45,4 @@ steps: displayName: 'Publish Coverage Artifact' inputs: targetPath: $(Build.ArtifactStagingDirectory) - artifactName: 'coverage-$(Agent.OS)-$(node_version)' + artifactName: 'coverage-$(Agent.OS)-$(node_version)' \ No newline at end of file diff --git a/azure-pipelines.pr.yml b/azure-pipelines.pr.yml index 200670f..eb608d6 100755 --- a/azure-pipelines.pr.yml +++ b/azure-pipelines.pr.yml @@ -5,6 +5,9 @@ trigger: pr: - master +variables: +- group: codecov + jobs: - job: Linux pool: From 81640ff7147b6d79f125f6d0c371cee67e6d9e18 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Mon, 22 Jul 2019 15:36:05 +1000 Subject: [PATCH 2/2] moving to the bash task for windows support --- .azure-pipelines/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/test.yml b/.azure-pipelines/test.yml index b6a5c58..be1cb9c 100755 --- a/.azure-pipelines/test.yml +++ b/.azure-pipelines/test.yml @@ -30,10 +30,12 @@ steps: reportDirectory: coverage/lcov-report condition: succeededOrFailed() - - script: | - bash <(curl https://codecov.io/bash) -t $(CODECOV_TOKEN) -f coverage/cobertura-coverage.xml + - bash: | + bash <(curl https://codecov.io/bash) -t $(TOKEN) -f coverage/cobertura-coverage.xml displayName: 'codecov' condition: succeededOrFailed() + env: + TOKEN: $(CODECOV_TOKEN) - task: CopyFiles@2 inputs: