#2620: run notebooks after test so that the results can be published

This commit is contained in:
Czar Echavez
2024-07-01 14:31:58 +01:00
parent cb61756e43
commit 4dd50be11a

View File

@@ -107,12 +107,20 @@ stages:
coverage html -d htmlcov -i
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
condition: succeededOrFailed()
displayName: 'Publish Test Results'
inputs:
testRunner: JUnit
testResultsFiles: 'junit/**.xml'
testResultsFiles: |
'junit/**.xml'
'notebook-tests/**.xml'
testRunTitle: 'Publish test results'
failTaskOnFailedTests: true
@@ -127,9 +135,3 @@ stages:
inputs:
codeCoverageTool: Cobertura
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()