-
Notifications
You must be signed in to change notification settings - Fork 34
62 lines (55 loc) · 1.85 KB
/
notebooks-except-cloud.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
name: Notebooks except cloud
on:
workflow_dispatch:
push:
branches:
- glebashnik/integration-except-cloud-to-github-action
# Uncomment it when reviewed
# - master
# pull_request:
# branches:
# - master
# schedule:
# - cron: '0 11 * * *'
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@main
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "pip"
cache-dependency-path: |
pyproject.toml
docs/sphinx/source/notebook_requirements.txt
- name: Install dependencies
run: |
pip install --no-cache-dir -e .[dev]
pip install --no-cache-dir -r docs/sphinx/source/notebook_requirements.txt
- name: Run notebooks tests
run: |
echo "Running ${{ matrix.notebook }}"
papermill --log-output ${{ matrix.notebook }} ${{ matrix.notebook }}-out.ipynb