-
Notifications
You must be signed in to change notification settings - Fork 289
41 lines (39 loc) · 1.05 KB
/
check_example_nbs.yml
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
name: "Check Example Notebooks"
on:
push:
branches: [master]
paths:
- "examples/**/*.py"
pull_request:
branches: [master]
paths:
- "examples/**/*.py"
workflow_dispatch:
jobs:
convert-to-nbs:
name: "Check Example Notebooks"
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Set Up Environment
run: |
make install-uv reset-venv
source .venv/bin/activate
make install-pinned-extras
- name: Convert using Script
run: |
source .venv/bin/activate
make generate-example-notebooks
- name: Check for diff
run: |
source .venv/bin/activate
git add examples/notebooks/
if ! git diff --cached --exit-code; then
echo "Notebooks have changed! Please run `make generate-example-notebooks` and commit the changes."
exit 1
fi