File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -37,5 +37,23 @@ steps:
3737
3838- script : |
3939 pip install pytest pytest-azurepipelines
40- pytest
41- displayName : ' pytest'
40+ mkdir -p test-results
41+ set -o pipefail
42+ pytest -vv --junitxml=test-results/junit.xml 2>&1 | tee test-results/pytest.log
43+ displayName : ' pytest (verbose + junit + log)'
44+
45+ - task : PublishTestResults@2
46+ displayName : ' Publish test results'
47+ condition : succeededOrFailed()
48+ inputs :
49+ testResultsFormat : ' JUnit'
50+ testResultsFiles : ' test-results/junit.xml'
51+ failTaskOnFailedTests : true
52+ testRunTitle : ' Python $(python.version) pytest'
53+
54+ - task : PublishPipelineArtifact@1
55+ displayName : ' Publish pytest log artifact'
56+ condition : succeededOrFailed()
57+ inputs :
58+ targetPath : ' test-results'
59+ artifact : ' pytest-logs-$(python.version)'
You can’t perform that action at this time.
0 commit comments