Skip to content

Commit

Permalink
feat: Add neovim 0.3.2+ support; Add fancy badges to README
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Jun 9, 2019
1 parent 5265b4b commit e3b6f57
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
language: generic
env:
- OPTIONS=--vim-81-only
- OPTIONS=--neovim-03-only
- OPTIONS=--linter-only
script: |
./run-tests -v $OPTIONS
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM tweekmonster/vim-testbed:latest

RUN install_vim -tag v8.1.0519 -build
RUN install_vim \
-tag v8.1.1511 -build \
-tag neovim:v0.3.2 -build

ENV PACKAGES="bash git python py-pip"

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# DoGe [![Travic CI Build Status](https://travis-ci.com/kkoomen/doge.svg?branch=master)](https://travis-ci.com/kkoomen/doge)
<center>
# DoGe
[![Travic CI Build Status](https://travis-ci.com/kkoomen/doge.svg?branch=master)](https://travis-ci.com/kkoomen/doge) ![Minimum supported vim version](https://img.shields.io/badge/vim-8.1%2B-informational.svg) ![Minimum supported neovim version](https://img.shields.io/badge/neovim-0.3.2%2B-informational.svg) ![License](https://img.shields.io/github/license/kkoomen/doge.svg)
</center>

We all love documentation because it makes our codebases easier to understand,
yet no one has time to write it in a good and proper way or some might not even
Expand Down
30 changes: 27 additions & 3 deletions run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ set -e
set -u

docker_image=kkoomen/doge
current_docker_image_id=17b41b268a58
current_docker_image_id=5a3156d58b1d

DOGE_DOCKER_IMAGE="$docker_image"
export DOGE_DOCKER_IMAGE

verbose_flag=''
verbose=0
run_vim_81_tests=1
run_neovim_03_tests=1
run_linter=1

while [ $# -ne 0 ]; do
Expand All @@ -48,12 +49,34 @@ while [ $# -ne 0 ]; do
;;
--vim-81-only)
run_linter=0
run_neovim_03_tests=0
shift
;;
--neovim-03-only)
run_linter=0
run_vim_81_tests=0
shift
;;
--linter-only)
run_vim_81_tests=0
run_neovim_03_tests=0
shift
;;
--help)
echo 'Usage: ./run-tests [OPTION]... [FILE]...'
echo
echo 'Filenames can be given as arguments to run a subset of tests.'
echo 'For example: ./run-tests test/filetypes/python/functions.vader test/filetypes/java/class-methods.vader'
echo
echo 'Options:'
echo ' -v Enable verbose output'
echo ' --vim-81-only Run tests only for Vim 8.1'
echo ' --neovim-03-only Run tests only for NeoVim 0.3'
echo ' --linters-only Run only Vint'
echo ' --help Show this help text'
echo ' -- Stop parsing options after this'
exit 0
;;
--)
shift
break
Expand Down Expand Up @@ -113,8 +136,9 @@ trap cancel_tests INT TERM

file_number=0
pid_list=''
for vim in $(docker run --rm "$DOGE_DOCKER_IMAGE" ls /vim-build/bin | grep '^vim'); do
if ( [[ $vim =~ ^vim-v8.1 ]] && ((run_vim_81_tests)) ); then
for vim in $(docker run --rm "$DOGE_DOCKER_IMAGE" ls /vim-build/bin | grep '^neovim\|^vim'); do
if ( [[ $vim =~ ^vim-v8.1 ]] && ((run_vim_81_tests)) ) \
|| ( [[ $vim =~ ^neovim-v0.3 ]] && ((run_neovim_03_tests)) ); then
echo "Starting Vim: $vim..."
file_number=$((file_number+1))
scripts/run-vader-tests $verbose_flag "$vim" "$tests" > "$output_dir/$file_number" 2>&1 &
Expand Down

0 comments on commit e3b6f57

Please sign in to comment.