Skip to content

Commit 6e20d7f

Browse files
authored
Merge pull request #534 from thewtex/notebook-testing
Notebook testing
2 parents 42311a4 + cbb84ec commit 6e20d7f

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Notebook tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run:
7+
runs-on: ubuntu-latest
8+
name: Test notebooks with nbmake
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- uses: actions/setup-python@v3
13+
with:
14+
python-version: '3.9'
15+
- uses: actions/setup-java@v3
16+
with:
17+
java-version: '8'
18+
distribution: 'zulu'
19+
- name: Install test dependencies
20+
run: |
21+
python3 -m pip install --upgrade pip
22+
python3 -m pip install -e ".[test]"
23+
python3 -m pip install pyimagej
24+
python3 -c "import imagej; ij = imagej.init('2.5.0'); print(ij.getVersion())"
25+
- name: Test notebooks
26+
run: |
27+
pytest --nbmake --nbmake-timeout=3000 examples/*ipynb

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ keywords = [
3636
requires-python = ">=3.7"
3737
dependencies = [
3838
"itkwasm >= 1.0b1",
39-
"imjoy-rpc >= 0.5.13",
39+
"imjoy-rpc >= 0.5.16",
4040
"imjoy-utils >= 0.1.2",
4141
"numcodecs",
4242
"multiscale_spatial_image >= 0.10.1",
@@ -68,5 +68,6 @@ notebook = [
6868
]
6969
test = [
7070
"pytest >=2.7.3",
71+
"nbmake",
7172
]
7273
doc = ["sphinx"]

0 commit comments

Comments
 (0)