From e3b6f575dfc609d1cde6f73dbc6d77400eaa0728 Mon Sep 17 00:00:00 2001 From: Kim K Date: Sun, 9 Jun 2019 21:05:52 +0200 Subject: [PATCH] feat: Add neovim 0.3.2+ support; Add fancy badges to README --- .travis.yml | 1 + Dockerfile | 4 +++- README.md | 5 ++++- run-tests | 30 +++++++++++++++++++++++++++--- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9723ecd..ec0570eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ services: language: generic env: - OPTIONS=--vim-81-only + - OPTIONS=--neovim-03-only - OPTIONS=--linter-only script: | ./run-tests -v $OPTIONS diff --git a/Dockerfile b/Dockerfile index 68caeebf..df6e6112 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" diff --git a/README.md b/README.md index e8c06410..dad459a0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# DoGe [![Travic CI Build Status](https://travis-ci.com/kkoomen/doge.svg?branch=master)](https://travis-ci.com/kkoomen/doge) +
+# 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) +
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 diff --git a/run-tests b/run-tests index 46447fdc..0690a094 100755 --- a/run-tests +++ b/run-tests @@ -29,7 +29,7 @@ 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 @@ -37,6 +37,7 @@ 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 @@ -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 @@ -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 &