From 1044225e094c607cede3a03312dc02799dd49f72 Mon Sep 17 00:00:00 2001 From: Mandeep Singh Baines Date: Thu, 13 Aug 2020 14:05:11 -0700 Subject: [PATCH 1/2] [chore] enable codecov --- .circleci/config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1105a36d5..d9b7eea34 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,6 +69,15 @@ install_repo_gpu: &install_repo_gpu export CUDA_HOME=/usr/local/cuda-10.1 python setup.py build develop + +run_coverage: &run_coverage + - run: + name: Run Unit Tests With Coverage + command: | + pytest --cov-report=xml --cov=./ + #Uploading test coverage for Python code + bash <(curl -s https://codecov.io/bash) -f coverage.xml -cF Python + run_unittests: &run_unittests - run: name: Run Unit Tests @@ -200,6 +209,8 @@ jobs: - <<: *run_unittests + - <<: *run_coverage + - store_test_results: path: test-results From e14640d132814dc9a37aae00e17b6663081464aa Mon Sep 17 00:00:00 2001 From: Mandeep Singh Baines Date: Thu, 13 Aug 2020 14:27:14 -0700 Subject: [PATCH 2/2] ignore tests and setup.py --- .coveragerc | 4 ++++ .gitignore | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..4daebdc3c --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[run] +omit = + tests/* + setup.py diff --git a/.gitignore b/.gitignore index 3d01f2ec3..dbd192693 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,3 @@ build/ dist/ - -.coverage*