chore: 计算单测覆盖率时忽略安卓部分

This commit is contained in:
voidking 2024-07-16 20:18:54 +08:00
parent bbb65c9669
commit 770d735d97
2 changed files with 10 additions and 1 deletions

7
.coveragerc Normal file
View file

@ -0,0 +1,7 @@
[run]
source =
./metagpt/
omit =
*/metagpt/environment/android/*
*/metagpt/ext/android_assistant/*
*/metagpt/ext/werewolf/*

View file

@ -32,7 +32,9 @@ jobs:
run: |
export ALLOW_OPENAI_API_CALL=0
mkdir -p ~/.metagpt && cp tests/config2.yaml ~/.metagpt/config2.yaml
pytest tests/ --ignore=tests/metagpt/environment/android_env --ignore=tests/metagpt/ext/android_assistant --doctest-modules --cov=./metagpt/ --cov-report=xml:cov.xml --cov-report=html:htmlcov --durations=20 | tee unittest.txt
pytest tests/ --ignore=tests/metagpt/environment/android_env --ignore=tests/metagpt/ext/android_assistant \
--doctest-modules --cov=./metagpt/ --cov-report=xml:cov.xml --cov-report=html:htmlcov \
--durations=20 | tee unittest.txt
- name: Show coverage report
run: |
coverage report -m