ci: add VCR caching to the notebooks (#1704)

This commit is contained in:
Vadym Barda
2024-09-12 16:07:41 -04:00
committed by GitHub
parent 95b97d69ec
commit 0b40c83fa8
135 changed files with 32409 additions and 28 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
- name: Codespell
uses: codespell-project/actions-codespell@v2
with:
skip: '*.ambr,*.lock,*.ipynb'
skip: '*.ambr,*.lock,*.ipynb,*.yaml'
ignore_words_list: ${{ steps.extract_ignore_words.outputs.ignore_words_list }}
# We do this to avoid spellchecking cell outputs
- name: Codespell Notebooks
+9 -3
View File
@@ -3,7 +3,7 @@ name: Run notebooks
on:
workflow_dispatch:
schedule:
- cron: '0 13 * * *'
- cron: '0 13 * * *'
jobs:
build:
@@ -33,11 +33,17 @@ jobs:
run: make start-services
- name: Prepare notebooks
if: ${{ matrix.lib-version == 'development' }}
run: poetry run python docs/_scripts/prepare_notebooks_for_ci.py
run: |
if [ "${{ matrix.lib-version }}" = "development" ]; then
poetry run python docs/_scripts/prepare_notebooks_for_ci.py --comment-install-cells
else
poetry run python docs/_scripts/prepare_notebooks_for_ci.py
fi
- name: Run notebooks
env:
# these won't actually be used because of the VCR cassettes
# but need to set them to avoid triggering getpass()
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}