Skip to content

Merge pull request #997 from vespa-engine/kkraune-patch-1 #378

Merge pull request #997 from vespa-engine/kkraune-patch-1

Merge pull request #997 from vespa-engine/kkraune-patch-1 #378

name: Notebooks except cloud
on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
get-non-cloud-notebooks:
runs-on: ubuntu-latest
outputs:
notebooks: ${{ steps.set_output.outputs.notebooks }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set output variable (Make sure it is this quote format - "[path/to/notebook1.ipynb", "path/to/notebook2.ipynb]")
id: set_output
run: |
notebooks=$(find docs -name '*.ipynb' ! -name '*cloud*.ipynb' ! -name 'colpali-document-retrieval-vision-language-models.ipynb' | jq -R -s -c 'split("\n")[:-1]')
# Print all notebooks echo
echo $notebooks
echo "notebooks=$notebooks" >> $GITHUB_OUTPUT
notebooks-except-cloud:
runs-on: ubuntu-latest
needs: get-non-cloud-notebooks
strategy:
max-parallel: 8
matrix:
notebook: ${{fromJson(needs.get-non-cloud-notebooks.outputs.notebooks)}}
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: |
pyproject.toml
- name: Install dependencies
run: |
pip install --no-cache-dir -e .[dev,notebooks]
- name: Run notebooks tests
run: |
echo "Running ${{ matrix.notebook }}"
papermill --log-output ${{ matrix.notebook }} ${{ matrix.notebook }}-out.ipynb