diff --git a/.coveragerc b/.coveragerc index 8cddf91c..189ab3f4 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,4 @@ [run] plugins = covimerage data_file = .coverage_covimerage +branch = 1 diff --git a/.travis.yml b/.travis.yml index 34a3e7f9..b0dd3dc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,30 +20,42 @@ jobs: - VIM_VERSION=master - MAKE_TARGET=vim/test - TEST_PROFILE=vim-profile-master.txt + - TEST_PYTHON=python3 - name: Installed Vim with checks env: - VIM_VERSION=installed - MAKE_TARGET=test - TEST_PROFILE=vim-profile-installed.txt - - TEST_PYTHON=python3 + - TEST_PYTHON="python -m coverage run --append" install: - | if [ "$VIM_VERSION" = 'installed' ]; then - pip install -q --user flake8 git+https://github.com/Kuniwak/vint + python -m pip install -q --user flake8 git+https://github.com/Kuniwak/vint else bash scripts/install-vim.sh export PATH=$HOME/vim/bin:$PATH fi - - pip install covimerage --user + - python -m pip install -q --user covimerage + - python -m pip freeze script: - uname -a - which -a vim - - vim --cmd version --cmd quit + - vim --version - make --keep-going $MAKE_TARGET after_success: + - curl -s https://codecov.io/bash > /tmp/codecov.sh + # Coverage from Python (cannot be combined with non-branch data). + - | + if [[ -f .coverage_covimerage ]]; then + coverage report -m + coverage xml + bash /tmp/codecov.sh -f coverage.xml -F python + fi + # Coverage from Vim. - covimerage write_coverage $TEST_PROFILE + - coverage report -m - coverage xml - - bash <(curl -s https://codecov.io/bash) -f coverage.xml + - bash /tmp/codecov.sh -f coverage.xml -F vimscript