Add files via upload #57
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: Test-Notebooks | |
# Run every time a new commit is pushed | |
# For more info, see: https://github.com/treebeardtech/nbmake | |
on: push | |
jobs: | |
# Set the job key | |
test-notebooks: | |
# Name the job | |
name: Test Jupyter Notebooks | |
# Set the type of machine to run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
# Checkout | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# Setup | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Restore | |
- name: Restore pip cache | |
uses: actions/cache@v2 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
# Install | |
- name: Install dependencies | |
run: | | |
pip install pytest nbmake | |
pip install -r requirements.txt | |
# Test | |
- name: Test notebooks | |
run: | | |
pytest --nbmake --nbmake-kernel=python3 **/*ipynb |