vimwiki/.travis.yml
2020-05-13 11:35:22 -04:00

28 lines
873 B
YAML

# 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