Skip to content

Commit b9af237

Browse files
authored
Merge pull request #146 from blueyed/cov
ci: coverage for Python
2 parents e13cb46 + 3d5ec96 commit b9af237

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[run]
22
plugins = covimerage
33
data_file = .coverage_covimerage
4+
branch = 1

.travis.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,42 @@ jobs:
2020
- VIM_VERSION=master
2121
- MAKE_TARGET=vim/test
2222
- TEST_PROFILE=vim-profile-master.txt
23+
- TEST_PYTHON=python3
2324
- name: Installed Vim with checks
2425
env:
2526
- VIM_VERSION=installed
2627
- MAKE_TARGET=test
2728
- TEST_PROFILE=vim-profile-installed.txt
28-
- TEST_PYTHON=python3
29+
- TEST_PYTHON="python -m coverage run --append"
2930

3031
install:
3132
- |
3233
if [ "$VIM_VERSION" = 'installed' ]; then
33-
pip install -q --user flake8 git+https://github.com/Kuniwak/vint
34+
python -m pip install -q --user flake8 git+https://github.com/Kuniwak/vint
3435
else
3536
bash scripts/install-vim.sh
3637
export PATH=$HOME/vim/bin:$PATH
3738
fi
38-
- pip install covimerage --user
39+
- python -m pip install -q --user covimerage
40+
- python -m pip freeze
3941

4042
script:
4143
- uname -a
4244
- which -a vim
43-
- vim --cmd version --cmd quit
45+
- vim --version
4446
- make --keep-going $MAKE_TARGET
4547

4648
after_success:
49+
- curl -s https://codecov.io/bash > /tmp/codecov.sh
50+
# Coverage from Python (cannot be combined with non-branch data).
51+
- |
52+
if [[ -f .coverage_covimerage ]]; then
53+
coverage report -m
54+
coverage xml
55+
bash /tmp/codecov.sh -f coverage.xml -F python
56+
fi
57+
# Coverage from Vim.
4758
- covimerage write_coverage $TEST_PROFILE
59+
- coverage report -m
4860
- coverage xml
49-
- bash <(curl -s https://codecov.io/bash) -f coverage.xml
61+
- bash /tmp/codecov.sh -f coverage.xml -F vimscript

0 commit comments

Comments
 (0)