Verify Imports in Jupyter Notebooks #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify Imports in Jupyter Notebooks | |
on: | |
schedule: | |
- cron: "0 0 * * 1" | |
workflow_dispatch: | |
jobs: | |
Check-Dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Repo contents | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | |
pip install pytest nbmake | |
pip install pytest-xdist | |
- name: Check each notebook | |
run: | |
find notebooks/* -name '*.ipynb' -exec pytest --nbmake -n=auto --nbmake-kernel=python3 --nbmake-find-import-errors {} + | |
- name: Check for errors | |
run: | | |
if [ $? -ne 0 ]; then | |
echo "Notebook execution failed." | |
exit 1 | |
fi | |