-
Notifications
You must be signed in to change notification settings - Fork 983
44 lines (38 loc) · 990 Bytes
/
notebook-testing.yml
File metadata and controls
44 lines (38 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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' ! -path './examples/qdp/*'); do
echo "Executing $nb"
uv run jupyter execute "$nb" --inplace
done