Skip to content

Commit

Permalink
Add travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tinmarino committed May 13, 2020
1 parent 0850ce1 commit e850cb8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# No language: we download vim and compile it oursselves
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 vimwiki .;
fi

script:
# Run All tests
- pushd test
- bash run_tests.sh
- popd
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ WORKDIR /vader
RUN git checkout de8a976f1eae2c2b680604205c3e8b5c8882493c

# build vim and neovim versions we want to test
# TODO uncomment nvim tag
WORKDIR /
RUN install_vim -tag v7.3.429 -name vim_7.3.429 -build \
-tag v7.4.1099 -name vim_7.4.1099 -build \
-tag v7.4.1546 -name vim_7.4.1546 -build \
-tag v8.0.0027 -name vim_8.0.0027 -build \
-tag v8.1.0519 -name vim_8.1.0519 -build \
-tag neovim:v0.3.8 -name nvim_0.3.8 -build \
# -tag neovim:v0.3.8 -name nvim_0.3.8 -build \

0 comments on commit e850cb8

Please sign in to comment.