Skip to content

ci: coverage for Python #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[run]
plugins = covimerage
data_file = .coverage_covimerage
branch = 1
22 changes: 17 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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