diff --git a/.github/workflows/checknb.yml b/.github/workflows/checknb.yml index a1fc28bc..cb8c4827 100644 --- a/.github/workflows/checknb.yml +++ b/.github/workflows/checknb.yml @@ -51,8 +51,16 @@ jobs: env: PYTHON: python - # Step to run Jupyter notebooks in specified subdirectories + # Install Papermill for executing notebooks + - name: Install Papermill + run: python -m pip install papermill + + # Run all Jupyter notebooks using the wildcard, capture errors - name: Run Jupyter Notebooks - uses: jupyter-actions/run-notebook@v2.0.0 - with: - path: "notebooks/**/*.ipynb" + run: | + EXIT_CODE=0 + for notebook in $(find notebooks -name "*.ipynb"); do + echo "Running notebook: $notebook" + papermill "$notebook" /dev/null || EXIT_CODE=$? + done + exit $EXIT_CODE