Skip to content

Commit 06473c7

Browse files
committed
try to collect coverage
Signed-off-by: Aleksei Stepanov <penguinolog@gmail.com>
1 parent 6fc5cfc commit 06473c7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.azure_pipelines/run_tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
displayName: Build and install
4646
4747
- script: |
48-
pip install asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar
48+
pip install asynctest mock pytest pytest-mock pytest-asyncio pytest-sugar pytest-cov
4949
50-
pytest -vvv --junitxml=unit_result.xml test
50+
pytest -vvv --junitxml=unit_result.xml --cov=exec_helpers --cov-report=xml --cov-report=html test
5151
displayName: PyTest
5252
5353
- task: PublishTestResults@2
@@ -57,3 +57,9 @@ jobs:
5757
testResultsFormat: "JUnit"
5858
testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/unit_result.xml') }}
5959
testRunTitle: ${{ format('{0}_{1}_{2}', parameters.name, parameters.architecture, parameters.kind) }}
60+
61+
- task: PublishCodeCoverageResults@1
62+
inputs:
63+
codeCoverageTool: Cobertura
64+
summaryFileLocation: ${{ format('$(System.DefaultWorkingDirectory)/coverage.xml') }}
65+
reportDirectory: ${{ format('$(System.DefaultWorkingDirectory)/htmlcov') }}

0 commit comments

Comments
 (0)