Skip to content

Commit 052149e

Browse files
committed
setup on each nb run - faster
1 parent 1c34620 commit 052149e

File tree

1 file changed

+5
-28
lines changed

1 file changed

+5
-28
lines changed

.github/workflows/examples_check.yml

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ on:
66
workflow_dispatch: # This enables manual triggering
77

88
jobs:
9-
setup:
9+
execute_notebooks:
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
notebook: [ "*.ipynb" ]
1114
env:
1215
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
1316
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
1417
HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }}
18+
NLTK_DATA: /tmp/nltk_data
1519
steps:
1620
- name: Checkout repository
1721
uses: actions/checkout@v2
@@ -42,33 +46,6 @@ jobs:
4246
run: |
4347
mkdir /tmp/nltk_data;
4448
poetry run python -m nltk.downloader -d /tmp/nltk_data punkt;
45-
- name: Upload artifacts
46-
uses: actions/upload-artifact@v3
47-
with:
48-
path: |
49-
/tmp/nltk_data
50-
./.venv
51-
./guardrails
52-
~/.cache/pypoetry
53-
54-
execute_notebooks:
55-
runs-on: ubuntu-latest
56-
needs: setup
57-
strategy:
58-
matrix:
59-
notebook: [ "*.ipynb" ]
60-
env:
61-
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
62-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
63-
HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }}
64-
NLTK_DATA: /tmp/nltk_data
65-
66-
67-
steps:
68-
- name: Download artifacts
69-
uses: actions/download-artifact@v3
70-
with:
71-
name: setup-artifacts
7249
- name: Use venv
7350
run: source .venv/bin/activate
7451
- name: Execute notebooks and check for errors

0 commit comments

Comments
 (0)