Skip to content

Commit ac948c9

Browse files
authored
ci: add matrix to run tests both on vim and neovim (#3)
* ci(test): add matrix to run tests both on vim and neovim * ci(test): set 'neovim' matrix in boolean * revert: "ci(test): set 'neovim' matrix in boolean" This reverts commit f572674. For more self-explanatory job names. * fix(make): correctly detect vim and nvim for flags * chore(make): output `$(VIM)` and `$(VIM_FLAGS)` on tests
1 parent af6611f commit ac948c9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,21 @@ on:
77
jobs:
88
ci:
99
runs-on: ubuntu-22.04
10+
strategy:
11+
matrix:
12+
editor: [vim, neovim]
1013
steps:
1114
- uses: actions/checkout@v4
1215
- name: vint
1316
uses: reviewdog/action-vint@v1
1417
with:
1518
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
- uses: rhysd/action-setup-vim@v1
20+
id: vim
21+
with:
22+
neovim: ${{ matrix.editor == 'neovim' }}
23+
version: stable
1624
- name: test
25+
env:
26+
VIM: ${{ steps.vim.outputs.executable }}
1727
run: make test

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
VIM ?= vim
22
VIM_FLAGS ?= --clean -u vimrc
3-
ifeq ($(VIM),vim)
3+
ifeq ($(notdir $(VIM)),vim)
44
VIM_FLAGS += -N -Es
5-
else ifeq ($(VIM),nvim)
5+
else ifeq ($(notdir $(VIM)),nvim)
66
VIM_FLAGS += --headless
77
endif
88

@@ -15,6 +15,8 @@ clean:
1515

1616
.PHONY: test
1717
test: test/vader.vim
18+
@echo Running tests against $(VIM) $(VIM_FLAGS)
19+
@echo
1820
@cd test && $(VIM) $(VIM_FLAGS) -c 'Vader! symlink.vader'
1921
@cd test && $(VIM) $(VIM_FLAGS) -R -c 'Vader! symlink.vader'
2022
@cd test && $(VIM) $(VIM_FLAGS) -c 'Vader! symlink-edit-in-popup.vader'

0 commit comments

Comments
 (0)