diff options
| author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2017-11-29 01:50:11 -0500 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2017-12-17 16:09:18 +0100 |
| commit | a1adfdc7d59979824addce2f519a527f9a5c0290 (patch) | |
| tree | 3cc9204170b430d11b1b40789908a9756b53e3e1 /ci | |
| parent | bfb21f3e012d9473d6038dd254fc3a0ecdf8c0e9 (diff) | |
| download | rneovim-a1adfdc7d59979824addce2f519a527f9a5c0290.tar.gz rneovim-a1adfdc7d59979824addce2f519a527f9a5c0290.tar.bz2 rneovim-a1adfdc7d59979824addce2f519a527f9a5c0290.zip | |
ci: nodejs client acceptance-test #7706
ci: install nodejs 8 in Appveyor, Travis
provider: check node version for debug support
Resolve https://github.com/neovim/neovim/pull/7577#issuecomment-350590592 for Unix.
provider: test if nodejs in ci supports --inspect-brk
nodejs host for neovim requires nodejs 6+ to work properly.
nodejs 6.12+ or 7.6+ is required for debug support via `node --inspect-brk`.
provider: run cli.js of nodejs host directly
npm shims are useless because the user cannot set node to debug mode via
--inspect-brk. This is problematic on Windows which use batchfiles and
shell scripts to compensate for not supporting shebang.
The patch uses `npm root -g` to get the absolute path of the global npm
modules. If that fails, then the user did not install neovim npm package
globally. Use that absolute path to find `neovim/bin/cli.js`, which is
what the npm shim actually runs with node. glob() is for a simple file
check in case bin/ is removed because the npm shims are ignored now.
Diffstat (limited to 'ci')
| -rwxr-xr-x | ci/before_install.sh | 12 | ||||
| -rw-r--r-- | ci/build.bat | 6 | ||||
| -rwxr-xr-x | ci/install.sh | 5 | ||||
| -rwxr-xr-x | ci/run_tests.sh | 1 |
4 files changed, 24 insertions, 0 deletions
diff --git a/ci/before_install.sh b/ci/before_install.sh index f84ad935bc..f5a57ad657 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -37,3 +37,15 @@ else # https://github.com/travis-ci/travis-ci/issues/8363 pip3 -q install --user --upgrade pip || true fi + +if [[ "${TRAVIS_OS_NAME}" == linux ]]; then + echo "Install node (LTS)" + + if [ ! -f ~/.nvm/nvm.sh ]; then + curl -o ~/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/master/nvm.sh + fi + + source ~/.nvm/nvm.sh + nvm install --lts + nvm use --lts +fi diff --git a/ci/build.bat b/ci/build.bat index 25f949b5e4..c5353ec5d1 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -37,6 +37,12 @@ set PATH=C:\Ruby24\bin;%PATH% cmd /c gem.cmd install neovim || goto :error where.exe neovim-ruby-host.bat || goto :error +cmd /c npm.cmd install -g neovim || goto :error +where.exe neovim-node-host.cmd || goto :error +for /f %%F in ('cmd /c npm root -g') do ( + set NODE_PATH=%%F +) + mkdir .deps cd .deps cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error diff --git a/ci/install.sh b/ci/install.sh index c8a0c8825d..2fe4f88822 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -23,3 +23,8 @@ CC=cc pip3 -q install --user --upgrade neovim || true echo "Install neovim RubyGem." gem install --no-document --version ">= 0.2.0" neovim + +if [[ "${TRAVIS_OS_NAME}" == linux ]]; then + echo "Install neovim npm package" + npm install -g neovim +fi diff --git a/ci/run_tests.sh b/ci/run_tests.sh index a0bf6e010d..ee3fa4a5af 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -23,6 +23,7 @@ if test "$CLANG_SANITIZER" != "TSAN" ; then # Additional threads are only created when the builtin UI starts, which # doesn't happen in the unit/functional tests run_test run_unittests + export NODE_PATH="$(npm root -g)" run_test run_functionaltests fi run_test run_oldtests |