浏览代码

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
/develop-gpu-test
GitHub 5 年前
当前提交
3c1f4dbb
共有 3 个文件被更改,包括 12 次插入3 次删除
  1. 6
      .circleci/config.yml
  2. 2
      .gitignore
  3. 7
      setup.cfg

6
.circleci/config.yml


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

- store_artifacts:
path: test-reports
destination: test-reports
- store_artifacts:
path: htmlcov
destination: htmlcov

2
.gitignore


# Code coverage report
.coverage
coverage.xml
/htmlcov/

7
setup.cfg


[coverage:run]
omit = */tests/*
# 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

正在加载...
取消
保存