-
Notifications
You must be signed in to change notification settings - Fork 18
47 lines (39 loc) · 1.23 KB
/
check-jupyter-wip.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
name: Testing notebooks with nbmake
on:
workflow_dispatch:
#push:
# branches:
# - "*"
#pull_request:
# branches:
# - "*"
jobs:
test-notebook:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install jupyter
pip install pytest nbmake nbformat
## Later move the above to a requrements.txt and run the below
## pip install -r requirements.txt
- name: Generate configuration file from secrets
env:
NOTEBOOK_GCP_PROJECT_ID: ${{ secrets.NOTEBOOK_GCP_PROJECT_ID }}
NOTEBOOK_GCP_LOCATION: ${{ secrets.NOTEBOOK_GCP_LOCATION }}
run: |
echo '{' > env.json
echo ' "NOTEBOOK_GCP_PROJECT_ID": "'${NOTEBOOK_GCP_PROJECT_ID}'",' >> env.json
echo ' "NOTEBOOK_GCP_LOCATION": "'${NOTEBOOK_GCP_LOCATION}'"' >> env.json
echo '}' >> env.json
- name: Run tests with pytest
run: |
pwd
#jupyter nbconvert --to notebook --execute notebooks/GenAI/Gemini_Intro.ipynb
pytest testing/test_notebooks.py