blob: 2c99dc71dbe859de964b722d09c4e9b2fe460582 [file] [log] [blame]
name: CI for Jupyter Notebooks
on:
push:
branches: [main]
paths:
- "**.py"
- "**.ipynb"
- "pyproject.toml"
- ".github/workflows/notebook-testing.yml"
pull_request:
branches: [main]
paths:
- "**.py"
- "**.ipynb"
- "pyproject.toml"
- ".github/workflows/notebook-testing.yml"
workflow_dispatch:
jobs:
test-notebooks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python with uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
enable-cache: true
- name: Install dependencies
run: |
uv venv
uv pip install nbclient ipykernel -e .
- name: Run Jupyter Notebooks
run: |
for nb in $(find . -name '*.ipynb'); do
echo "Executing $nb"
uv run jupyter execute "$nb" --inplace
done