-
Notifications
You must be signed in to change notification settings - Fork 1.4k
54 lines (46 loc) · 1.39 KB
/
run_notebooks.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
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Run notebooks
on:
pull_request:
branches:
- main
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
lib-version:
- "development"
- "latest"
name: "test (langgraph: ${{ matrix.lib-version }})"
steps:
- uses: actions/checkout@v4
- name: Set up Python + Poetry
uses: "./.github/actions/poetry_setup"
with:
python-version: 3.11
poetry-version: 1.7.1
cache-key: test-langgraph-notebooks
- name: Install dependencies
run: |
poetry install --with docs
poetry run pip install jupyter
- name: Start services
run: make start-services
- name: Prepare notebooks
if: ${{ matrix.lib-version == 'development' }}
run: poetry run python docs/_scripts/prepare_notebooks_for_ci.py
- name: Run notebooks
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
run: |
for file in $(find docs/docs/how-tos -name "*.ipynb")
do
echo "Executing $file"
PIP_PRE=1 poetry run jupyter execute "$file"
done
- name: Stop services
run: make stop-services