Skip to content

Commit

Permalink
Update check-jupyter-wip.yml
Browse files Browse the repository at this point in the history
Changes to use pytest with test_notebook.py script.
  • Loading branch information
furniturewalatkNIH authored Nov 19, 2024
1 parent 8f96153 commit 0113e6b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/check-jupyter-wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ jobs:
## Later move the above to a requrements.txt and run the below
## pip install -r requirements.txt
- name: Setup required variables
- 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 "NOTEBOOK_GCP_PROJECT_ID=${NOTEBOOK_PROJECT_ID}" >> $GITHUB_ENV
echo "NOTEBOOK_GCP_LOCATION=${NOTEBOOK_GCP_LOCATION}" >> $GITHUB_ENV
- name: Test notebook
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 --nbmake notebooks/GenAI/Gemini_Intro.ipynb --variable-file=env.json
pytest testing/test_notebooks.py

0 comments on commit 0113e6b

Please sign in to comment.