#2084: publish coverage report + more verbose test output
This commit is contained in:
@@ -98,14 +98,21 @@ stages:
|
||||
displayName: 'Perform PrimAITE Setup'
|
||||
|
||||
- script: |
|
||||
pytest --cov=src --cov-report=html --cov-report=xml --cov-fail-under=80
|
||||
pytest -v tests/ --cov=src/ -o junit_family=xunit2 --junitxml=junit/test-results.xml --cov-report xml:coverage.xml --cov-report html:src/coverage/html
|
||||
displayName: 'Run tests and code coverage'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
condition: succeededOrFailed()
|
||||
inputs:
|
||||
testRunner: JUnit
|
||||
testResultsFiles: 'junit/**.xml'
|
||||
testRunTitle: 'Publish test results'
|
||||
|
||||
- task: PublishCodeCoverageResults@1
|
||||
displayName: 'Publish coverage report'
|
||||
inputs:
|
||||
codeCoverageTool: Cobertura
|
||||
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage.xml
|
||||
pathToSources: $(System.DefaultWorkingDirectory)/src/
|
||||
reportDirectory: $(System.DefaultWorkingDirectory)/htmlcov/
|
||||
reportDirectory: $(System.DefaultWorkingDirectory)/src/coverage/html/
|
||||
failIfCoverageEmpty: true
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -37,6 +37,7 @@ pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
junit/
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
|
||||
Reference in New Issue
Block a user