#2620: run notebooks after test so that the results can be published
This commit is contained in:
@@ -107,12 +107,20 @@ stages:
|
|||||||
coverage html -d htmlcov -i
|
coverage html -d htmlcov -i
|
||||||
displayName: 'Run tests and code coverage'
|
displayName: 'Run tests and code coverage'
|
||||||
|
|
||||||
|
# Run the notebooks to make sure that they work
|
||||||
|
- script: |
|
||||||
|
pytest --nbmake -n=auto src/primaite/notebooks --junit-xml=./notebook-tests/notebooks.xml
|
||||||
|
pytest --nbmake -n=auto src/primaite/simulator/_package_data --junit-xml=./notebook-tests/package-notebooks.xml
|
||||||
|
displayName: 'Run notebooks'
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
displayName: 'Publish Test Results'
|
displayName: 'Publish Test Results'
|
||||||
inputs:
|
inputs:
|
||||||
testRunner: JUnit
|
testRunner: JUnit
|
||||||
testResultsFiles: 'junit/**.xml'
|
testResultsFiles: |
|
||||||
|
'junit/**.xml'
|
||||||
|
'notebook-tests/**.xml'
|
||||||
testRunTitle: 'Publish test results'
|
testRunTitle: 'Publish test results'
|
||||||
failTaskOnFailedTests: true
|
failTaskOnFailedTests: true
|
||||||
|
|
||||||
@@ -127,9 +135,3 @@ stages:
|
|||||||
inputs:
|
inputs:
|
||||||
codeCoverageTool: Cobertura
|
codeCoverageTool: Cobertura
|
||||||
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
|
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
|
||||||
# Run the notebooks to make sure that they work
|
|
||||||
- script: |
|
|
||||||
pytest --nbmake -n=auto src/primaite/notebooks --junit-xml=./notebook-tests/notebooks.xml
|
|
||||||
pytest --nbmake -n=auto src/primaite/simulator/_package_data --junit-xml=./notebook-tests/package-notebooks.xml
|
|
||||||
displayName: 'Run notebooks'
|
|
||||||
condition: succeededOrFailed()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user