Skip to content

Commit

Permalink
Merge pull request #22 from dynamicslab/14-validate-examples
Browse files Browse the repository at this point in the history
run notebooks on pull request
  • Loading branch information
briandesilva authored Jan 21, 2020
2 parents 6d14c7b + b35c243 commit 03e9381
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check Examples

on: [pull_request]

jobs:
run:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
pip install papermill
- name: Execute notebooks with papermill
run: |
cd example
for nb in *.ipynb; do papermill --report-mode $nb out.json; done
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
4 changes: 1 addition & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test with pytest
run: |
pip install pytest
py.test test --cov=sindy --flake8
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ flake8-builtins-unleashed
codecov
setuptools_scm
setuptools_scm_git_archive
jupyter
notebook

0 comments on commit 03e9381

Please sign in to comment.