Skip to content

Commit 4110f82

Browse files
authoredNov 24, 2017
Merge pull request #73 from haya14busa/coverage
Introduce covimerage for test coverage
2 parents e02173c + 1a884b9 commit 4110f82

File tree

8 files changed

+33
-4
lines changed

8 files changed

+33
-4
lines changed
 

‎.codecov.yml

+10
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

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
plugins = covimerage
3+
data_file = .coverage.covimerage

‎.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,35 @@ matrix:
88
- env:
99
- VIM_VERSION=v7.4
1010
- MAKE_TARGET=test
11+
- TEST_PROFILE=vim-profile-v7.4.txt
1112
- env:
1213
- VIM_VERSION=v8.0.0000
1314
- MAKE_TARGET=test
15+
- TEST_PROFILE=vim-profile-v8.0.txt
1416
- env:
1517
- VIM_VERSION=master
1618
- MAKE_TARGET=test
19+
- TEST_PROFILE=vim-profile-master.txt
1720
- env:
1821
- VIM_VERSION=installed
1922
- MAKE_TARGET="clean_compiled check js/test py/test test/node_position/test_position.out"
23+
- TEST_PROFILE=vim-profile-installed.txt
2024

2125
install:
2226
- |
2327
if [ "$VIM_VERSION" != 'installed' ]; then
2428
bash scripts/install-vim.sh
2529
export PATH=$HOME/vim/bin:$PATH
2630
fi
31+
- pip install covimerage --user
2732

2833
script:
2934
- uname -a
3035
- which -a vim
3136
- vim --cmd version --cmd quit
3237
- make $MAKE_TARGET
38+
39+
after_success:
40+
- covimerage write_coverage $TEST_PROFILE
41+
- coverage xml
42+
- bash <(curl -s https://codecov.io/bash)

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ py/test: py/vimlparser.py
2626
test/run_command.sh python py/vimlparser.py
2727

2828
test/node_position/test_position.out: test/node_position/test_position.vim test/node_position/test_position.ok
29-
vim -u NONE -N --cmd "let &rtp .= ',' . getcwd()" -S test/node_position/test_position.vim
29+
vim -Nu test/vimrc -S test/node_position/test_position.vim
3030
diff -u test/node_position/test_position.ok test/node_position/test_position.out
3131

3232
.PHONY: all clean_compiled check test js/test py/test

‎scripts/install-vim.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ set -ev
44

55
git clone --depth 1 --branch "${VIM_VERSION}" https://github.com/vim/vim /tmp/vim
66
cd /tmp/vim
7-
./configure --prefix="${HOME}/vim" --with-features=big --enable-fail-if-missing
7+
./configure --prefix="${HOME}/vim" --with-features=huge --enable-fail-if-missing
88
make -j2
99
make install

‎test/run.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
vim -u NONE -N --cmd "let &rtp .= ',' . getcwd()" -S test/run.vim
2+
vim -Nu test/vimrc -S test/run.vim
33
set EXIT=%ERRORLEVEL%
44
if exist test.log type test.log
55
exit /b %EXIT%

‎test/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
vim -u NONE -N --cmd "let &rtp .= ',' . getcwd()" -S test/run.vim
2+
vim -Nu test/vimrc -S test/run.vim
33
EXIT=$?
44
[ -e test.log ] && cat test.log
55
exit $EXIT

‎test/vimrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
let &rtp .= ',' . getcwd()
2+
3+
if $TEST_PROFILE != ''
4+
execute 'profile' 'start' $TEST_PROFILE
5+
profile! file ./autoload/*
6+
endif

0 commit comments

Comments
 (0)
Please sign in to comment.