Use vim-testbed to run Vader tests on Travis
This commit is contained in:
parent
d8d08de26c
commit
210d464442
5 changed files with 67 additions and 4 deletions
14
.travis.yml
14
.travis.yml
|
@ -1,8 +1,14 @@
|
|||
---
|
||||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
language: python
|
||||
python: 2.7
|
||||
cache: pip
|
||||
install:
|
||||
- "pip install vim-vint==0.3.9"
|
||||
script:
|
||||
- "vint -s ."
|
||||
install: |
|
||||
pip install vim-vint==0.3.9
|
||||
script: |
|
||||
EXIT=0
|
||||
vint -s || EXIT=$?
|
||||
make test || EXIT=$?
|
||||
exit $EXIT
|
||||
|
|
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
FROM tweekmonster/vim-testbed:latest
|
||||
|
||||
RUN install_vim -tag v8.0.0000 -build \
|
||||
-tag v8.0.0027 -build
|
||||
|
||||
ENV PACKAGES="\
|
||||
git \
|
||||
"
|
||||
RUN apk --update add $PACKAGES && \
|
||||
rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN git clone https://github.com/junegunn/vader.vim vader && \
|
||||
cd vader && git checkout c6243dd81c98350df4dec608fa972df98fa2a3af
|
14
Makefile
Normal file
14
Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
IMAGE ?= w0rp/ale
|
||||
DOCKER = docker run -a stderr --rm -v $(PWD):/testplugin -v $(PWD)/test:/home "$(IMAGE)"
|
||||
|
||||
test-setup:
|
||||
docker images -q $(IMAGE) || docker pull $(IMAGE)
|
||||
|
||||
test: test-setup
|
||||
vims=$$(docker run --rm $(IMAGE) ls /vim-build/bin | grep -E '^n?vim'); \
|
||||
if [ -z "$$vims" ]; then echo "No Vims found!"; exit 1; fi; \
|
||||
for vim in $$vims; do \
|
||||
$(DOCKER) $$vim '+Vader! test/*'; \
|
||||
done
|
||||
|
||||
.PHONY: test-setup test
|
9
test/example.vader
Normal file
9
test/example.vader
Normal file
|
@ -0,0 +1,9 @@
|
|||
Given (Hello):
|
||||
Hello
|
||||
|
||||
Do (yyp):
|
||||
yyp
|
||||
|
||||
Expect (Hello\nHello):
|
||||
Hello
|
||||
Hello
|
21
test/vimrc
Normal file
21
test/vimrc
Normal file
|
@ -0,0 +1,21 @@
|
|||
" Load builtin plugins
|
||||
" We need this because run_vim.sh sets -i NONE
|
||||
set rtp=/home/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/home/vim/after
|
||||
set rtp+=/vader
|
||||
|
||||
" The following is just an example
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
set nocompatible
|
||||
set tabstop=4
|
||||
set softtabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
set backspace=2
|
||||
set nofoldenable
|
||||
set foldmethod=syntax
|
||||
set foldlevelstart=10
|
||||
set foldnestmax=10
|
||||
set ttimeoutlen=0
|
||||
|
||||
let mapleader=','
|
Reference in a new issue