Skip to content

Update check-jupyter.yml #200

Update check-jupyter.yml

Update check-jupyter.yml #200

Workflow file for this run

name: Test Notebooks
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
test-notebooks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Check - Install dependencies
run: |
echo -e "\n\n ---------------- Doing install of pip BELOW ---- \n"
python -m pip install --upgrade pip
echo -e "\n\n ------- Doing pip install of jupyter BELOW ----\n"
pip install jupyter nbformat nbconvert
echo -e "\n\n ------- Doing install of R BELOW ----- \n"
sudo apt install r-base r-base-dev -y
echo -e "\n\n -------- Starting R BELOW ----- \n"
R --vanilla << EOF
install.packages('IRkernel')
IRkernel::installspec()
EOF
echo -e "\n\n ------- Listing the kernels installed BELOW ----\n"
jupyter kernelspec list
- name: Execute Notebooks
run: |
echo -e "\n\n\n\n -------- Finding and checking the Jupyter notebooks BELOW ----- \n\n"
find tutorials/notebooks/* -name '*.ipynb' -exec jupyter nbconvert --to notebook --execute {} +
- name: Check for errors
run: |
if [ $? -ne 0 ]; then
echo "Notebook execution failed."
exit 1
fi