diff --git a/.github/workflows/notebook-test.yml b/.github/workflows/notebook-test.yml new file mode 100644 index 00000000..733e2144 --- /dev/null +++ b/.github/workflows/notebook-test.yml @@ -0,0 +1,27 @@ +name: Notebook tests + +on: [push, pull_request] + +jobs: + run: + runs-on: ubuntu-latest + name: Test notebooks with nbmake + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v3 + with: + python-version: '3.9' + - uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'zulu' + - name: Install test dependencies + run: | + python3 -m pip install --upgrade pip + python3 -m pip install -e ".[test]" + python3 -m pip install pyimagej + python3 -c "import imagej; ij = imagej.init('2.5.0'); print(ij.getVersion())" + - name: Test notebooks + run: | + pytest --nbmake --nbmake-timeout=3000 examples/*ipynb diff --git a/pyproject.toml b/pyproject.toml index 7517a2c8..efd10c94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ keywords = [ requires-python = ">=3.7" dependencies = [ "itkwasm >= 1.0b1", - "imjoy-rpc >= 0.5.13", + "imjoy-rpc >= 0.5.16", "imjoy-utils >= 0.1.2", "numcodecs", "multiscale_spatial_image >= 0.10.1", @@ -68,5 +68,6 @@ notebook = [ ] test = [ "pytest >=2.7.3", + "nbmake", ] doc = ["sphinx"]