forked from Thieso/jupyter-vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
39 lines (30 loc) · 1.39 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Testing Versions:
# python3.7 (It is hardcoded everywhere) (>= 3.6 for format strings)
# vim latest
language: generic
cache:
# Enable cache folder
bundler: true
directories:
- $HOME/docker_images
before_cache:
# Save tagged docker images. Info at https://github.com/travis-ci/travis-ci/issues/5358#issuecomment-248915326
- >
mkdir -p $HOME/docker_images && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}'
| xargs -n 2 -t sh -c 'test -e $HOME/docker_images/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker_images/$1.tar.gz'
before_install:
# Install docker
- n_image=$(ls -1 $HOME/docker_images/*.tar.gz | wc -l)
- if (( $n_image )); then ls $HOME/docker_images/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load";
else docker build --tag jupyter-vim .;
fi
env:
- VIM_VERSION=vint
- VIM_VERSION=pylint
- VIM_VERSION=vim_8.1.0519
script:
- run_docker=(docker run -it --rm -v $PWD/:/testplugin jupyter-vim)
- if [[ "$VIM_VERSION" == vint ]]; then "${run_docker[@]}" bash -c "vint -s /testplugin && vint -s /testplugin/test/vimrc";
elif [[ "$VIM_VERSION" == pylint ]]; then "${run_docker[@]}" bash -c "shopt -s extglob; pylint --disable=E0401,W0511 /testplugin/**/*.py";
else "${run_docker[@]}" "/vim-build/bin/$VIM_VERSION" -i NONE -N -u /testplugin/test/vimrc -Es '+Vader! /testplugin/test/*.vader';
fi