aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitermayer <mitermayer.reis@gmail.com>2019-08-30 05:02:09 +0000
committermitermayer <mitermayer.reis@gmail.com>2019-08-30 05:05:29 +0000
commit568a15530cbb3b91dbf0c1c688cd5d27ccf8949b (patch)
treee6cb742357cb44014cb7fac20b2a18594c5035b3
parentb47fb046d880815e8d8a4974167ee2a81f1cd4cf (diff)
downloadvim-prettier-568a15530cbb3b91dbf0c1c688cd5d27ccf8949b.tar.xz
enabling-tests-to-auto-run-on-ci - Fixing linting and moving to use yarn
on the tests - fixing lint that was forced to test build - use yarn over npm - use yarn cache
-rw-r--r--.travis.yml7
-rw-r--r--Dockerfile3
-rw-r--r--autoload/prettier/logging/error.vim2
-rwxr-xr-xrun-test18
4 files changed, 19 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index c146062..8419911 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,17 @@
---
language: python
+cache:
+ yarn: true
+ directories:
+ - node_modules
+
services:
- docker
before_install:
- docker pull mitermayer/vim-test-bed
- - npm install
+ - yarn install
script:
- ./run-test
diff --git a/Dockerfile b/Dockerfile
index 0dcb58d..50fb9cd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,5 +23,8 @@ RUN install_vim -tag v7.4.052 -name vim7 -build \
# alias vim to allow contextual load
RUN echo 'alias vim="/sbin/run_vim $DEFAULT_VIM"' >> ~/.bashrc
+# upgrade node and yarn
+RUN npm install -g npm yarn
+
# install vint
RUN pip install typing>=3.6.2 pathlib==1.0.1 enum34>=1.0.4 vim-vint==0.3.19
diff --git a/autoload/prettier/logging/error.vim b/autoload/prettier/logging/error.vim
index 3539a1e..48ad048 100644
--- a/autoload/prettier/logging/error.vim
+++ b/autoload/prettier/logging/error.vim
@@ -7,6 +7,6 @@ let s:DEFAULT_ERROR = get(s:, 'PARSING_ERROR')
function! prettier#logging#error#log(...) abort
let l:error = a:0 > 0 ? a:1 : s:DEFAULT_ERROR
- let l:msg = a:0 > 1 ? ': ' . :2 : ''
+ let l:msg = a:0 > 1 ? ': ' . a:2 : ''
echohl WarningMsg | echom s:PREFIX_MSG . get(s:ERRORS, l:error, s:DEFAULT_ERROR) . l:msg | echohl NONE
endfunction
diff --git a/run-test b/run-test
index fc52cee..724706d 100755
--- a/run-test
+++ b/run-test
@@ -8,12 +8,12 @@ docker run \
"mitermayer/vim-test-bed" \
vint testplugin
-#echo "Running tests..."
-#docker run \
-# --rm \
-# --entrypoint=/bin/bash \
-# -v $PWD:/testplugin \
-# -v $PWD/tests:/home \
-# "mitermayer/vim-test-bed" \
-# -s
-# npm test
+echo "Running tests..."
+docker run \
+ --rm \
+ --entrypoint=/bin/bash \
+ -v $PWD:/testplugin \
+ -v $PWD/tests:/home \
+ "mitermayer/vim-test-bed" \
+ -s
+ yarn test