From ab6c1278def4d85288e0d1d2654ac980aae689cd Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 12 Aug 2019 01:43:38 +0200 Subject: [PATCH 1/2] Travis: use "vim --version" This avoids output issues. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 34a3e7f9..35682825 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ install: script: - uname -a - which -a vim - - vim --cmd version --cmd quit + - vim --version - make --keep-going $MAKE_TARGET after_success: From 3d5ec96e4fc0973fa0a0327ec6af2bacf6f91db4 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 12 Aug 2019 00:46:27 +0200 Subject: [PATCH 2/2] ci: report coverage for Python --- .coveragerc | 1 + .travis.yml | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) 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 35682825..b0dd3dc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,22 +20,24 @@ 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 @@ -44,6 +46,16 @@ script: - 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