From 7005e67f8c445c68ac665322c29f512136487af0 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Sat, 11 Nov 2023 18:47:16 +0100 Subject: [PATCH] Add tests of the built package --- .github/workflows/ci.yml | 11 +++++++++++ tests/unit-tests/test_ragstack.py | 2 ++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a9ba054d..74f3c95d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,3 +44,14 @@ jobs: # export ASTRA_DB_TOKEN="${{ secrets.E2E_TESTS_ASTRA_DB_TOKEN }}" # export OPEN_AI_KEY="${{ secrets.E2E_TESTS_OPEN_AI_KEY }}" # ./dev/run-e2e-tests.sh + + - name: Build the distribution package + run: | + poetry build + + - name: Test the distribution package + run: | + python -m venv /tmp/venv + source /tmp/venv/bin/activate + pip install dist/ragstack_ai-*.whl + pytest tests/unit-tests \ No newline at end of file diff --git a/tests/unit-tests/test_ragstack.py b/tests/unit-tests/test_ragstack.py index 6119bb568..4d38f0224 100644 --- a/tests/unit-tests/test_ragstack.py +++ b/tests/unit-tests/test_ragstack.py @@ -1,3 +1,5 @@ def test_import(): from langchain.vectorstores import Cassandra # noqa + import langserve # noqa + import langsmith # noqa