Skip to content

Commit 0d538d3

Browse files
authored
[ci]: Support code diff coverage (#1834)
Support code diff coverage Support to add the pull request checks for Code diff coverage in GitHub. Support to display the code diff coverage html report in Azure Pipelines.
1 parent 48887d1 commit 0d538d3

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

azure-pipelines.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ stages:
1919
jobs:
2020
- job:
2121
displayName: "Python3"
22+
variables:
23+
DIFF_COVER_CHECK_THRESHOLD: 0
24+
DIFF_COVER_ENABLE: 'true'
2225
pool:
2326
vmImage: ubuntu-20.04
2427

@@ -91,14 +94,6 @@ stages:
9194
python3 setup.py test
9295
displayName: 'Test Python 3'
9396
94-
- script: |
95-
sudo pip3 install diff-cover
96-
target_branch=$(System.PullRequest.TargetBranch)
97-
compare_branch=origin/${target_branch#refs/heads/}
98-
diff-cover coverage.xml --compare-branch=$compare_branch
99-
condition: eq(variables['Build.Reason'], 'PullRequest')
100-
displayName: "Diff coverage"
101-
10297
- task: PublishTestResults@2
10398
inputs:
10499
testResultsFiles: '$(System.DefaultWorkingDirectory)/test-results.xml'

0 commit comments

Comments
 (0)