Skip to content

Commit 982e0bf

Browse files
authored
Merge pull request #554 from vim-jp/ci-coverage
Introduce covimerage for test coverage
2 parents 425a6a6 + 3cf013a commit 982e0bf

6 files changed

Lines changed: 51 additions & 4 deletions

File tree

.codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 0%
6+
patch:
7+
default:
8+
target: 0%
9+
10+
comment: false

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
plugins = covimerage
3+
data_file = .coverage.covimerage

.travis.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ git:
66
matrix:
77
include:
88
- os: linux
9-
env: VIM_VERSION=v7.4
9+
env:
10+
- VIM_VERSION=v7.4
11+
- THEMIS_PROFILE=vim-profile-v7.4.txt
1012
- os: linux
11-
env: VIM_VERSION=v8.0.0000
13+
env:
14+
- VIM_VERSION=v8.0.0000
15+
- THEMIS_PROFILE=vim-profile-v8.0.txt
1216
- os: linux
13-
env: VIM_VERSION=master
17+
env:
18+
- VIM_VERSION=master
19+
- THEMIS_PROFILE=vim-profile-master.txt
1420
- os: osx
1521
osx_image: xcode8.3
22+
env:
23+
- THEMIS_PROFILE=vim-profile-osx.txt
1624

1725
addons:
1826
apt:
@@ -22,6 +30,7 @@ addons:
2230
- libperl-dev
2331
- python-dev
2432
- python3-dev
33+
- python3-pip
2534
- liblua5.1-0-dev
2635
- lua5.1
2736
- ruby-dev
@@ -30,6 +39,9 @@ install:
3039
- rvm reset
3140
- bash scripts/install-vim.sh
3241
- export PATH=$HOME/vim/bin:$PATH
42+
# Install https://github.com/Vimjas/covimerage
43+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then brew install python3 ; fi
44+
- pip3 install covimerage --user
3345

3446
before_script:
3547
- git clone --depth 1 --branch v1.5.3 --single-branch https://github.com/thinca/vim-themis /tmp/vim-themis
@@ -44,6 +56,12 @@ script:
4456
# - /tmp/vim-themis/bin/themis --runtimepath /tmp/vimproc --reporter dot
4557
- /tmp/vim-themis/bin/themis --runtimepath /tmp/vimproc --exclude ConcurrentProcess --reporter dot
4658
- ruby scripts/check-changelog.rb
59+
60+
after_success:
61+
- covimerage write_coverage $THEMIS_PROFILE
62+
- coverage xml
63+
- bash <(curl -s https://codecov.io/bash)
64+
4765
notifications:
4866
webhooks:
4967
urls:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# vital.vim [![Build Status](https://travis-ci.org/vim-jp/vital.vim.svg?branch=master)](https://travis-ci.org/vim-jp/vital.vim) [![Build status](https://ci.appveyor.com/api/projects/status/078w3wc2eocwa558/branch/master?svg=true)](https://ci.appveyor.com/project/vim-jp/vital-vim/branch/master)
1+
# vital.vim [![Build Status](https://travis-ci.org/vim-jp/vital.vim.svg?branch=master)](https://travis-ci.org/vim-jp/vital.vim) [![Build status](https://ci.appveyor.com/api/projects/status/078w3wc2eocwa558/branch/master?svg=true)](https://ci.appveyor.com/project/vim-jp/vital-vim/branch/master) [![codecov](https://codecov.io/gh/vim-jp/vital.vim/branch/master/graph/badge.svg)](https://codecov.io/gh/vim-jp/vital.vim)
22

33
[![Join the chat at https://gitter.im/vim-jp/vital.vim](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vim-jp/vital.vim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44

appveyor.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ clone_depth: 10
33
environment:
44
matrix:
55
- VIM_URL: http://vim-jp.org/redirects/koron/vim-kaoriya/vim74/oldest/win64/
6+
THEMIS_PROFILE: vim-profile-win-v7.4.txt
67
- VIM_URL: http://vim-jp.org/redirects/koron/vim-kaoriya/vim80/oldest/win64/
8+
THEMIS_PROFILE: vim-profile-win-v8.0.txt
79
- VIM_URL: http://vim-jp.org/redirects/koron/vim-kaoriya/latest/win64/
10+
THEMIS_PROFILE: vim-profile-win-latest.txt
811
# To test with latest official Vim binary, uncomment below line.
912
#- VIM_URL: http://vim-jp.org/redirects/vim/vim-win32-installer/latest/x64/
1013
install:
@@ -26,6 +29,14 @@ build: off
2629
test_script:
2730
- '%THEMIS_VIM% --version'
2831
- '%TEMP%\vim-themis\bin\themis.bat --runtimepath %TEMP%\vimproc --exclude ConcurrentProcess --reporter dot'
32+
after_test:
33+
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
34+
- pip install codecov
35+
- pip install covimerage
36+
- covimerage write_coverage %THEMIS_PROFILE%
37+
- coverage xml
38+
- codecov -f coverage.xml
39+
2940
deploy: off
3041
notifications:
3142
- provider: Webhook

test/.themisrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ call themis#option('runtimepath', g:testplugin_root)
1515
call themis#option('runtimepath', g:cyclic_module_root)
1616
call themis#option('runtimepath', g:symlinkplugin_root)
1717

18+
if $THEMIS_PROFILE !=# ''
19+
execute 'profile' 'start' $THEMIS_PROFILE
20+
profile! file ./autoload/*
21+
endif
22+
1823
" Show environmental information for debugging
1924
if $CI !=# ''
2025
call themis#log('***********************************************************')

0 commit comments

Comments
 (0)