python coverage: specify dirs, exclude test files (#2473)
* specify dirs, exclude test files * update comments * html coverage in CI artifacts * add destination * ignore coverage files * check gym-unity too
This commit is contained in:
Родитель
9cde0073f6
Коммит
4b1f1a3c1b
|
@ -37,7 +37,7 @@ jobs:
|
|||
command: |
|
||||
. venv/bin/activate
|
||||
mkdir test-reports
|
||||
pytest --cov=mlagents --cov-report xml --junitxml=test-reports/junit.xml -p no:warnings
|
||||
pytest --cov=ml-agents --cov=ml-agents-envs --cov=gym-unity --cov-report html --junitxml=test-reports/junit.xml -p no:warnings
|
||||
|
||||
- run:
|
||||
name: Check Code Style using pre-commit
|
||||
|
@ -58,3 +58,7 @@ jobs:
|
|||
- store_artifacts:
|
||||
path: test-reports
|
||||
destination: test-reports
|
||||
|
||||
- store_artifacts:
|
||||
path: htmlcov
|
||||
destination: htmlcov
|
||||
|
|
|
@ -102,3 +102,5 @@ venv/
|
|||
|
||||
# Code coverage report
|
||||
.coverage
|
||||
coverage.xml
|
||||
/htmlcov/
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
[coverage:run]
|
||||
omit = */tests/*
|
||||
|
||||
[coverage:report]
|
||||
# Run "pytest --cov=mlagents" to see the current coverage percentage.
|
||||
# Run "pytest --cov=mlagents --cov-report html" to get a nice visualization of what is/isn't coverge in html format.
|
||||
# Run "pytest --cov=ml-agents --cov=ml-agents-envs --cov=gym-unity" to see the current coverage percentage.
|
||||
# Run the above plus "--cov-report html" to get a nice visualization of what is/isn't covered in html format.
|
||||
fail_under = 60
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче