-
Notifications
You must be signed in to change notification settings - Fork 15.8k
63 lines (54 loc) · 1.92 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
55
56
57
58
59
60
61
62
63
name: Run notebooks
on:
workflow_dispatch:
inputs:
python_version:
description: 'Python version'
required: false
default: '3.11'
working-directory:
description: 'Working directory or subset (e.g., docs/docs/tutorials/llm_chain.ipynb)'
required: false
default: 'all'
schedule:
- cron: '0 13 * * *'
env:
POETRY_VERSION: "1.7.1"
jobs:
build:
runs-on: ubuntu-latest
name: "Test docs"
steps:
- uses: actions/checkout@v4
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
with:
python-version: ${{ github.event.inputs.python_version || '3.11' }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: run-notebooks
- name: Install dependencies
run: |
pip install -e libs/core
pip install -e libs/langchain
pip install -e libs/community
pip install --upgrade langchain-experimental
pip install -e libs//partners/anthropic
pip install -e libs//partners/chroma
pip install -e libs//partners/openai
pip install -e libs//partners/mistralai
pip install jupyter langgraph click pypdf vcrpy
- name: Pre-download tiktoken files
run: |
python docs/scripts/download_tiktoken.py
- name: Prepare notebooks
run: |
python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells
- name: Run notebooks
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
run: |
./docs/scripts/execute_notebooks.sh ${{ github.event.inputs.working-directory || 'all' }}