diff --git a/.github/workflows/notebook-testing.yml b/.github/workflows/notebook-testing.yml new file mode 100644 index 000000000..56c105d32 --- /dev/null +++ b/.github/workflows/notebook-testing.yml @@ -0,0 +1,34 @@ +name: CI for Jupyter Notebooks + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test-notebooks: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install nbconvert nbclient ipykernel + + - name: Run Jupyter Notebooks + run: | + for notebook in $(find . -name '*.ipynb'); do + echo "Executing $notebook" + jupyter nbconvert --to notebook --execute --inplace $notebook + done