diff --git a/.ci_support/build_notebooks.sh b/.ci_support/build_notebooks.sh new file mode 100644 index 00000000..08c14214 --- /dev/null +++ b/.ci_support/build_notebooks.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# execute notebooks +i=0; +for notebook in $(ls notebooks/*.ipynb); do + papermill ${notebook} ${notebook%.*}-out.${notebook##*.} -k python3 || i=$((i+1)); +done; + +# push error to next level +if [ $i -gt 0 ]; then + exit 1; +fi; \ No newline at end of file diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index f4d28f53..9cfb0934 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -34,4 +34,4 @@ jobs: timeout-minutes: 5 run: > flux start - papermill notebooks/examples.ipynb examples-out.ipynb -k "python3" + .ci_support/build_notebooks.sh