From 4dd50be11ac9242084ec30030a7ff6e58f4d5df1 Mon Sep 17 00:00:00 2001 From: Czar Echavez Date: Mon, 1 Jul 2024 14:31:58 +0100 Subject: [PATCH] #2620: run notebooks after test so that the results can be published --- .azure/azure-ci-build-pipeline.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.azure/azure-ci-build-pipeline.yaml b/.azure/azure-ci-build-pipeline.yaml index a27fed25..9217748b 100644 --- a/.azure/azure-ci-build-pipeline.yaml +++ b/.azure/azure-ci-build-pipeline.yaml @@ -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()