#2620: publish result of test and checking if pipeline fails

This commit is contained in:
Czar Echavez
2024-07-01 12:00:17 +01:00
parent ce58f3960c
commit ee4e152f13
3 changed files with 20 additions and 3 deletions

View File

@@ -128,6 +128,13 @@ stages:
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
# Run the notebooks to make sure that they work
- script: |
pytest --nbmake -n=auto src/primaite/notebooks
pytest --nbmake -n=auto src/primaite/simulator/_package_data
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()
inputs:
testRunner: JUnit
testResultsFiles: 'notebook-tests/**.xml'
testRunTitle: 'Publish Notebook run'
failTaskOnFailedTests: true