diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 002d4dffdd69..be1bd8e5f3b9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -91,6 +91,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'