[Enhancement] support coverage (#16)

* support coverage

* test codecov action 2
This commit is contained in:
AllentDan 2021-12-29 16:26:41 +08:00 committed by GitHub
parent f2594c624b
commit f693f7cc41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,3 +48,13 @@ jobs:
coverage run --branch --source mmdeploy -m pytest -rsE tests/
coverage xml
coverage report -m
# Upload the coverage report for python3.7 && pytorch1.8.0
- name: Upload coverage to Codecov
if: ${{matrix.torch == '1.8.0' && matrix.python-version == '3.7'}}
uses: codecov/codecov-action@v2
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false