#2620: Going around azure dev ops to fail the script
This commit is contained in:
@@ -109,8 +109,27 @@ stages:
|
||||
|
||||
# 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
|
||||
# Detect OS
|
||||
if [ "$(uname)" = "Linux" ] || [ "$(uname)" = "Darwin" ]; then
|
||||
# Commands for Linux and macOS
|
||||
pytest --nbmake -n=auto src/primaite/notebooks --junit-xml=./notebook-tests/notebooks.xml
|
||||
notebooks_exit_code=$?
|
||||
pytest --nbmake -n=auto src/primaite/simulator/_package_data --junit-xml=./notebook-tests/package-notebooks.xml
|
||||
package_notebooks_exit_code=$?
|
||||
# Fail step if either of these do not have exit code 0
|
||||
if [ $notebooks_exit_code -ne 0 ] || [ $package_notebooks_exit_code -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# Commands for Windows
|
||||
pytest --nbmake -n=auto src/primaite/notebooks --junit-xml=./notebook-tests/notebooks.xml
|
||||
set notebooks_exit_code=%ERRORLEVEL%
|
||||
pytest --nbmake -n=auto src/primaite/simulator/_package_data --junit-xml=./notebook-tests/package-notebooks.xml
|
||||
set package_notebooks_exit_code=%ERRORLEVEL%
|
||||
# Fail step if either of these do not have exit code 0
|
||||
if %notebooks_exit_code% NEQ 0 exit /b 1
|
||||
if %package_notebooks_exit_code% NEQ 0 exit /b 1
|
||||
fi
|
||||
displayName: 'Run notebooks'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
|
||||
@@ -37,9 +37,7 @@ dependencies = [
|
||||
"typer[all]==0.9.0",
|
||||
"pydantic==2.7.0",
|
||||
"ipywidgets",
|
||||
"deepdiff",
|
||||
"nbmake==1.5.4",
|
||||
"pytest-xdist==3.3.1"
|
||||
"deepdiff"
|
||||
]
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
@@ -74,7 +72,9 @@ dev = [
|
||||
"Sphinx==7.1.2",
|
||||
"sphinx-copybutton==0.5.2",
|
||||
"wheel==0.38.4",
|
||||
"nbsphinx==0.9.4"
|
||||
"nbsphinx==0.9.4",
|
||||
"nbmake==1.5.4",
|
||||
"pytest-xdist==3.3.1"
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
|
||||
Reference in New Issue
Block a user