diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml index 02e6ee3d0..7b884d149 100644 --- a/.github/workflows/unittest.yaml +++ b/.github/workflows/unittest.yaml @@ -19,14 +19,11 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install -e .[test] - npm install -g @mermaid-js/mermaid-cli - playwright install --with-deps chromium + sh tests/scripts/run_install_deps.sh - name: Test with pytest run: | 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 + pytest tests/ --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=./metagpt/ --cov-report=xml:cov.xml --cov-report=html:htmlcov --durations=20 coverage report -m - name: Upload pytest test results uses: actions/upload-artifact@v3 diff --git a/requirements.txt b/requirements.txt index 832b4c1c8..f4363da1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,7 +29,7 @@ PyYAML==6.0.1 setuptools==65.6.3 tenacity==8.2.2 tiktoken==0.5.2 -tqdm==4.64.0 +tqdm==4.65.0 #unstructured[local-inference] # selenium>4 # webdriver_manager<3.9 diff --git a/setup.py b/setup.py index c3d04ddba..29c44d3c1 100644 --- a/setup.py +++ b/setup.py @@ -38,10 +38,11 @@ extras_require["test"] = [ "pytest-cov", "pytest-mock", "pytest-html", + "pytest-xdist", "connexion[uvicorn]~=3.0.5", "azure-cognitiveservices-speech~=1.31.0", "aioboto3~=11.3.0", - "chromadb==0.3.23", + "chromadb==0.4.14", "gradio==3.0.0", "grpcio-status==1.48.2", ] diff --git a/tests/scripts/run_install_deps.sh b/tests/scripts/run_install_deps.sh new file mode 100644 index 000000000..2758e24da --- /dev/null +++ b/tests/scripts/run_install_deps.sh @@ -0,0 +1,4 @@ +python -m pip install --upgrade pip +pip install -e .[test] +npm install -g @mermaid-js/mermaid-cli +playwright install --with-deps chromium \ No newline at end of file