diff --git a/.github/workflows/notebooks.yaml b/.github/workflows/notebooks.yaml index e1cd908..c235e1d 100644 --- a/.github/workflows/notebooks.yaml +++ b/.github/workflows/notebooks.yaml @@ -51,7 +51,9 @@ jobs: pip install pytest nbmake - name: "Test notebooks: pytest --nbmake" - run: pytest --nbmake -- **/*ipynb + run: | + echo "testing notebooks" + pytest --nbmake -- **/test_*.ipynb - name: Upload logs as artefacts if: always() diff --git a/notebooks/test_happy.ipynb b/notebooks/test_happy.ipynb new file mode 100644 index 0000000..6bdaad6 --- /dev/null +++ b/notebooks/test_happy.ipynb @@ -0,0 +1,35 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "0fecf498-25b1-4608-ab9d-15f0c13e1949", + "metadata": {}, + "outputs": [], + "source": [ + "print(\"I'm a happy notebook.\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/pyproject.toml b/pyproject.toml index b191d99..07f88cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,7 @@ lint = "pre-commit run --all-files" complete = { call = "tasks.complete:main", help = "Create autocomplete files for bash and fish" } [tool.pdm.dev-dependencies] -test = ["pdm[pytest]", "pytest-cov"] +test = ["nbmake", "pdm[pytest]", "pytest-cov"] tox = ["tox", "tox-pdm>=0.5"] docs = ["sphinx>=7.2.6", "sphinx-copybutton>=0.5.2"] dev = ["tox>=4.11.3", "tox-pdm>=0.7.0"]