diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dd6a20950b..8208f52857 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,6 +82,14 @@ stages: python3 setup.py test displayName: 'Test Python 3' + - script: | + sudo pip3 install diff-cover + target_branch=$(System.PullRequest.TargetBranch) + compare_branch=origin/${target_branch#refs/heads/} + diff-cover coverage.xml --compare-branch=$compare_branch + condition: eq(variables['Build.Reason'], 'PullRequest') + displayName: "Diff coverage" + - task: PublishTestResults@2 inputs: testResultsFiles: '$(System.DefaultWorkingDirectory)/test-results.xml'