From 7646dc00e0a5d9f7f2ff7b3c5a8c62d1139c70a1 Mon Sep 17 00:00:00 2001 From: Jason Hu Date: Mon, 1 Apr 2019 20:31:05 -0700 Subject: [PATCH] Add codecov (#22649) --- .circleci/config.yml | 5 +++-- requirements_test.txt | 1 + requirements_test_all.txt | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c9d75d934b..cde04d08e40 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -172,13 +172,14 @@ jobs: - install - run: - name: run tests + name: run tests with code coverage command: | . venv/bin/activate + CC_SWITCH="--cov --cov-report=" TESTFILES=$(circleci tests glob "tests/**/test_*.py" | circleci tests split --split-by=timings) - if [ -z "$CODE_COVERAGE" ]; then CC_SWITCH=""; else CC_SWITCH="--cov --cov-report html:htmlcov"; fi pytest --timeout=9 --duration=10 --junitxml=test-reports/homeassistant/results.xml -qq -o junit_family=xunit2 -o junit_suite_name=homeassistant -o console_output_style=count -p no:sugar $CC_SWITCH -- ${TESTFILES} script/check_dirty + codecov - store_test_results: path: test-reports diff --git a/requirements_test.txt b/requirements_test.txt index bf96353144c..0cd8c583f38 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,6 +2,7 @@ # make new things fail. Manually update these pins when pulling in a # new version asynctest==0.12.2 +codecov==2.0.15 coveralls==1.2.0 flake8-docstrings==1.3.0 flake8==3.7.7 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 76ec85148e2..974cfef9cd0 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -3,6 +3,7 @@ # make new things fail. Manually update these pins when pulling in a # new version asynctest==0.12.2 +codecov==2.0.15 coveralls==1.2.0 flake8-docstrings==1.3.0 flake8==3.7.7