Skip to content

Commit

Permalink
Add nvim tests in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed May 20, 2017
1 parent 6737022 commit ab5dc45
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ matrix:
env: VIM_VERSION=v8.0.0000
- os: linux
env: VIM_VERSION=master
- os: linux
env: VIM_VERSION=nvim
- os: osx
- os: osx
env: VIM_VERSION=nvim

addons:
apt:
Expand All @@ -25,22 +29,17 @@ addons:
- lua5.1

install:
- bash scripts/install-vim.sh
- export PATH=$HOME/vim/bin:$PATH
- test "$VIM_VERSION" == "nvim" && bash scripts/install-nvim.sh || bash scripts/install-vim.sh

before_script:
- git clone --depth 1 --branch v1.5.2.1 --single-branch https://github.com/thinca/vim-themis /tmp/vim-themis
- git clone --depth 1 https://github.com/Shougo/vimproc.vim /tmp/vimproc
- (cd /tmp/vimproc && make)

script:
- uname -a
- which -a vim
- vim --cmd version --cmd quit
- vim --cmd "try | helptags doc/ | catch | cquit | endtry" --cmd quit
# - /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
- bash scripts/script.sh

notifications:
webhooks:
urls:
Expand Down
23 changes: 23 additions & 0 deletions scripts/install-nvim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -ev

case "${TRAVIS_OS_NAME}" in
linux)
tmp=$(mktemp -d)
url=https://github.com/neovim/neovim
git clone -q --depth 1 --single-branch $url $tmp
cd $tmp
make -j2 CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=$HOME/neovim" CMAKE_BUILD_TYPE=Release
make install
;;
osx)
brew update
brew upgrade
brew install neovim/neovim/neovim
;;
*)
echo "Unknown value of \${TRAVIS_OS_NAME}: ${TRAVIS_OS_NAME}"
exit 65
;;
esac
24 changes: 24 additions & 0 deletions scripts/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -x

export PATH="$HOME/vim/bin:/tmp/vim-themis/bin:$PATH"

if [[ "$VIM_VERSION" == "nvim" ]]; then
export PATH="$HOME/neovim/bin:/tmp/vim-themis/bin:$PATH"
export THEMIS_VIM="nvim"
export THEMIS_ARGS="-e -s --headless"
uname -a
which -a nvim
which -a themis
themis --target System.Job --reporter dot
else
export THEMIS_HOME="/tmp/vim-themis"
export THEMIS_VIM="vim"

uname -a
which -a vim
which -a themis
vim --cmd version --cmd quit
vim --cmd "try | helptags doc/ | catch | cquit | endtry" --cmd quit
themis --runtimepath /tmp/vimproc --exclude ConcurrentProcess --reporter dot
fi

0 comments on commit ab5dc45

Please sign in to comment.