Skip to content

Migrated non-cloud screwdriver pipelines to GitHub Actions workflows #33

Migrated non-cloud screwdriver pipelines to GitHub Actions workflows

Migrated non-cloud screwdriver pipelines to GitHub Actions workflows #33

Workflow file for this run

name: Notebooks - cloud
on:
workflow_dispatch:
pull_request:
branches:
- master
schedule:
- cron: '0 11 * * *'
jobs:
get-notebooks-cloud:
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 '*cloud.ipynb*' ! -name 'mother-of-all-embedding-models-cloud.ipynb' | jq -R -s -c 'split("\n")[:-1]')
# Print all notebooks echo
echo $notebooks
echo "notebooks=$notebooks" >> $GITHUB_OUTPUT
notebooks-cloud:
runs-on: ubuntu-latest
needs: get-notebooks-cloud
strategy:
max-parallel: 8
matrix:
notebook: ${{fromJson(needs.get-notebooks-cloud.outputs.notebooks)}}
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: "pip" # caching pip dependencies
cache-dependency-path: |
pyproject.toml
- name: Install dependencies
run: |
pip install -e .[dev,notebooks]
- name: Run notebooks tests
env:
VESPA_TEAM_API_KEY: ${{ secrets.VESPA_TEAM_API_KEY }}
CO_API_KEY: ${{ secrets.CO_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
echo "Running ${{ matrix.notebook }}"
papermill --log-output ${{ matrix.notebook }} ${{ matrix.notebook }}-out.ipynb