🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
pr trigger unittest, maintainer approve the unittest
voidkingf7d04d7f8151
diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yamlindex c4df6dbf6..51b644214 100644--- a/.github/workflows/unittest.yaml+++ b/.github/workflows/unittest.yaml@@ -1,11 +1,21 @@name: Python application teston:- workflow_dispatch:+ pull_request:+ branches:+ - 'main'+ - 'dev'+ - '*-release'+ push:+ branches:+ - 'main'+ - 'dev'+ - '*-release'jobs:build:runs-on: ubuntu-latest+ environment: unitteststrategy:matrix:# python-version: ['3.9', '3.10', '3.11']@@ -23,6 +33,7 @@ jobs:- name: Test with pytestrun: |echo "${{ secrets.METAGPT_KEY_YAML }}" | base64 -d > config/key.yaml+ mkdir -p ~/.metagpt/ && echo "${{ secrets.METAGPT_KEY_YAML }}" | base64 -d > ~/.metagpt/key.yamlpytest tests/ --doctest-modules --cov=./metagpt/ --cov-report=xml:cov.xml --cov-report=html:htmlcov --durations=20 | tee unittest.txt- name: Show coverage reportrun: |@@ -30,6 +41,11 @@ jobs:- name: Show failed tests and overall summaryrun: |grep -E "FAILED tests|[0-9]+ passed," unittest.txt+ failed_count=$(grep "FAILED" unittest.txt | wc -l)+ if [[ "$failed_count" -gt 0 ]]; then+ echo "$failed_count failed lines found! Task failed."+ exit 1+ fi- name: Upload pytest test resultsuses: actions/upload-artifact@v3with:@@ -40,4 +56,5 @@ jobs:./tests/data/rsp_cache_new.jsonretention-days: 3if: ${{ always() }}+\ No newline at end of filediff --git a/tests/scripts/run_install_deps.sh b/tests/scripts/run_install_deps.shindex 2758e24da..9e483ed1d 100644--- a/tests/scripts/run_install_deps.sh+++ b/tests/scripts/run_install_deps.sh@@ -1,4 +1,4 @@python -m pip install --upgrade pippip install -e .[test]npm install -g @mermaid-js/mermaid-cli-playwright install --with-deps chromium\ No newline at end of file+playwright install --with-deps\ No newline at end of file