From f070b1a6c70e7c5c32c4a3671dfde318e5eec9db Mon Sep 17 00:00:00 2001 From: voidking Date: Fri, 29 Dec 2023 22:57:50 +0800 Subject: [PATCH 1/2] bugfix: unittest dependencies --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2b652fb18..c3d04ddba 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,6 @@ extras_require = { "search-google": ["google-api-python-client==2.94.0"], "search-ddg": ["duckduckgo-search~=4.1.1"], "ocr": ["paddlepaddle==2.4.2", "paddleocr>=2.0.1", "tabulate==0.9.0"], - "test": ["pytest", "pytest-cov", "pytest-asyncio", "pytest-mock"], } extras_require["test"] = [ @@ -39,6 +38,12 @@ extras_require["test"] = [ "pytest-cov", "pytest-mock", "pytest-html", + "connexion[uvicorn]~=3.0.5", + "azure-cognitiveservices-speech~=1.31.0", + "aioboto3~=11.3.0", + "chromadb==0.3.23", + "gradio==3.0.0", + "grpcio-status==1.48.2", ] extras_require["pyppeteer"] = [ From ea87ad399ffc28312cda726fe5e99755beec66e6 Mon Sep 17 00:00:00 2001 From: voidking Date: Fri, 29 Dec 2023 23:12:24 +0800 Subject: [PATCH 2/2] bugfix: unittest ci --- .github/workflows/unittest.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml index 565cdaead..02e6ee3d0 100644 --- a/.github/workflows/unittest.yaml +++ b/.github/workflows/unittest.yaml @@ -20,14 +20,12 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e. + pip install -e .[test] npm install -g @mermaid-js/mermaid-cli playwright install --with-deps chromium - name: Test with pytest run: | - pip install pytest pytest-asyncio pytest-cov pytest-html - export OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" OPENAI_API_MODEL="gpt-3.5-turbo-1106" - export PYPPETEER_EXECUTABLE_PATH="/usr/bin/chromium" + echo "${{ secrets.METAGPT_KEY_YAML }}" | base64 -d > config/key.yaml pytest tests/ --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=./metagpt/ --cov-report=xml:cov.xml --cov-report=html:htmlcov coverage report -m - name: Upload pytest test results