diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5401a1a..ae44de6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,11 +7,21 @@ on: jobs: ci: runs-on: ubuntu-22.04 + strategy: + matrix: + editor: [vim, neovim] steps: - uses: actions/checkout@v4 - name: vint uses: reviewdog/action-vint@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} + - uses: rhysd/action-setup-vim@v1 + id: vim + with: + neovim: ${{ matrix.editor == 'neovim' }} + version: stable - name: test + env: + VIM: ${{ steps.vim.outputs.executable }} run: make test diff --git a/Makefile b/Makefile index 915dae7..435d3a4 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ VIM ?= vim VIM_FLAGS ?= --clean -u vimrc -ifeq ($(VIM),vim) +ifeq ($(notdir $(VIM)),vim) VIM_FLAGS += -N -Es -else ifeq ($(VIM),nvim) +else ifeq ($(notdir $(VIM)),nvim) VIM_FLAGS += --headless endif @@ -15,6 +15,8 @@ clean: .PHONY: test test: test/vader.vim + @echo Running tests against $(VIM) $(VIM_FLAGS) + @echo @cd test && $(VIM) $(VIM_FLAGS) -c 'Vader! symlink.vader' @cd test && $(VIM) $(VIM_FLAGS) -R -c 'Vader! symlink.vader' @cd test && $(VIM) $(VIM_FLAGS) -c 'Vader! symlink-edit-in-popup.vader'