diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 6b81f7b4..355da234 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -42,6 +42,9 @@ jobs: echo "LIST_OF_IPYNB_CHANGED=None" >> $GITHUB_ENV fi + - name: Set authentication + run: echo "${{ secrets.CLASSIQ_CREDENTIALS_B64 }}" | base64 --decode > "${HOME}/.classiq-credentials" + - name: "Run tests" run: python -m pytest tests env: diff --git a/tests/test_notebooks.py b/tests/test_notebooks.py new file mode 100644 index 00000000..59bfb4d3 --- /dev/null +++ b/tests/test_notebooks.py @@ -0,0 +1,10 @@ +from testbook import testbook +from utils_for_tests import iterate_notebooks + +TIMEOUT: int = 60 * 3 # 3 minutes + + +def test_notebooks() -> None: + for notebook_path in iterate_notebooks(): + with testbook(notebook_path, execute=True, timeout=TIMEOUT): + pass # we simply wish it to run without errors diff --git a/tests/utils_for_tests.py b/tests/utils_for_tests.py index f2f80fb5..9ea9dd19 100644 --- a/tests/utils_for_tests.py +++ b/tests/utils_for_tests.py @@ -2,7 +2,7 @@ from collections.abc import Iterable from pathlib import Path -ROOT_DIRECTORY = Path(__file__).parent +ROOT_DIRECTORY = Path(__file__).parents[1] def iterate_notebooks() -> Iterable[str]: