Skip to content
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

Introduce covimerage for test coverage #554

Merged
merged 10 commits into from
Nov 24, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
project:
default:
target: 0%
patch:
default:
target: 0%

comment: false
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
plugins = covimerage
data_file = .coverage.covimerage
24 changes: 21 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ git:
matrix:
include:
- os: linux
env: VIM_VERSION=v7.4
env:
- VIM_VERSION=v7.4
- THEMIS_PROFILE=vim-profile-v7.4.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

themis.vim に直接関係がある変数じゃないので THEMIS_ プレフィックスは要らないかも?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

themis で実行するときのprofileファイルの指定なのであったほうがいいと思います

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

公式っぽすぎてややこしそうという話はある

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

うーむ.了解です.

- os: linux
env: VIM_VERSION=v8.0.0000
env:
- VIM_VERSION=v8.0.0000
- THEMIS_PROFILE=vim-profile-v8.0.txt
- os: linux
env: VIM_VERSION=master
env:
- VIM_VERSION=master
- THEMIS_PROFILE=vim-profile-master.txt
- os: osx
osx_image: xcode8.3
env:
- THEMIS_PROFILE=vim-profile-osx.txt

addons:
apt:
Expand All @@ -22,6 +30,7 @@ addons:
- libperl-dev
- python-dev
- python3-dev
- python3-pip
- liblua5.1-0-dev
- lua5.1
- ruby-dev
Expand All @@ -30,6 +39,9 @@ install:
- rvm reset
- bash scripts/install-vim.sh
- export PATH=$HOME/vim/bin:$PATH
# Install https://github.com/Vimjas/covimerage
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then brew install python3 ; fi
- pip3 install covimerage --user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip3 は Linux ワーカーにないっぽい https://travis-ci.org/vim-jp/vital.vim/jobs/306686068


before_script:
- git clone --depth 1 --branch v1.5.3 --single-branch https://github.com/thinca/vim-themis /tmp/vim-themis
Expand All @@ -44,6 +56,12 @@ script:
# - /tmp/vim-themis/bin/themis --runtimepath /tmp/vimproc --reporter dot
- /tmp/vim-themis/bin/themis --runtimepath /tmp/vimproc --exclude ConcurrentProcess --reporter dot
- ruby scripts/check-changelog.rb

after_success:
- covimerage write_coverage $THEMIS_PROFILE
- coverage xml
- bash <(curl -s https://codecov.io/bash)

notifications:
webhooks:
urls:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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)
# 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)

[![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)

Expand Down
11 changes: 11 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ clone_depth: 10
environment:
matrix:
- VIM_URL: http://vim-jp.org/redirects/koron/vim-kaoriya/vim74/oldest/win64/
THEMIS_PROFILE: vim-profile-win-v7.4.txt
- VIM_URL: http://vim-jp.org/redirects/koron/vim-kaoriya/vim80/oldest/win64/
THEMIS_PROFILE: vim-profile-win-v8.0.txt
- VIM_URL: http://vim-jp.org/redirects/koron/vim-kaoriya/latest/win64/
THEMIS_PROFILE: vim-profile-win-latest.txt
# To test with latest official Vim binary, uncomment below line.
#- VIM_URL: http://vim-jp.org/redirects/vim/vim-win32-installer/latest/x64/
install:
Expand All @@ -26,6 +29,14 @@ build: off
test_script:
- '%THEMIS_VIM% --version'
- '%TEMP%\vim-themis\bin\themis.bat --runtimepath %TEMP%\vimproc --exclude ConcurrentProcess --reporter dot'
after_test:
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
- pip install codecov
- pip install covimerage
- covimerage write_coverage %THEMIS_PROFILE%
- coverage xml
- codecov -f coverage.xml

deploy: off
notifications:
- provider: Webhook
Expand Down
5 changes: 5 additions & 0 deletions test/.themisrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ call themis#option('runtimepath', g:testplugin_root)
call themis#option('runtimepath', g:cyclic_module_root)
call themis#option('runtimepath', g:symlinkplugin_root)

if $THEMIS_PROFILE !=# ''
execute 'profile' 'start' $THEMIS_PROFILE
profile! file ./autoload/*
endif

" Show environmental information for debugging
if $CI !=# ''
call themis#log('***********************************************************')
Expand Down