-
Notifications
You must be signed in to change notification settings - Fork 53
40 lines (33 loc) · 1.09 KB
/
test-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
40
name: Test code in notebooks
on:
push:
branches: [ 'master\+ipynb' ]
types: [created, edited, deleted, renamed, forced] # for force pushes from our actions
workflow_dispatch:
inputs:
tags:
description: 'Run test of notebooks manually'
jobs:
test-lnx-py37:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade jupyter
python3 -m pip install --upgrade -r requirements.txt
- name: Testing notebooks
run: |
for f in docs/source/*.ipynb
do
jupyter nbconvert --to notebook --inplace --execute $f || (echo "$f" >> failed_nbs.txt)
done
if [ -f "failed_nbs.txt" ]; then
echo "Some notebooks failed to run. Please check logs."
cat failed_nbs.txt
exit 1
fi