-
Notifications
You must be signed in to change notification settings - Fork 327
39 lines (37 loc) · 1.09 KB
/
notebooks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
on:
schedule:
# run twice a month during times when hopefully few other jobs are scheduled
- cron: '0 12 6,21 * *'
jobs:
find-notebooks:
runs-on: ubuntu-latest
outputs:
paths: ${{ steps.find-notebooks.outputs.paths }}
steps:
- name: List Files
id: find-notebooks
uses: mirko-felice/[email protected]
with:
repo: ${{ github.repository }}
ref: ${{ github.ref }}
path: "examples"
ext: ".ipynb"
run-notebooks:
needs: find-notebooks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
files: ${{ fromJson(needs.find-notebooks.outputs.paths) }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Install dependencies
run: |
pip install .[cvxpy,miosr] sympy nbconvert jupyter matplotlib seaborn pandas dysts
- name: Run Notebook
run: |
jupyter nbconvert --execute --to notebook --inplace ${{ matrix.files }}