Skip to content

Commit fa5745e

Browse files
committed
Test using a matrix of (neo)vim versions
1 parent 56d6487 commit fa5745e

File tree

2 files changed

+38
-16
lines changed

2 files changed

+38
-16
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,43 @@ on:
1010
- master
1111

1212
jobs:
13-
checks:
13+
lint:
1414
runs-on: ubuntu-latest
15-
1615
steps:
1716
- uses: actions/checkout@v4
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
17+
- uses: raven-actions/actionlint@v2
18+
- uses: actions/setup-python@v5
2019
with:
2120
python-version: '3.12'
2221
cache: 'pip'
23-
- name: Install vim
24-
run: |
25-
sudo add-apt-repository ppa:jonathonf/vim
26-
sudo apt install vim
27-
- name: Run lint
28-
run: |
29-
pip install -r requirements.txt
30-
make lint
31-
- name: Run tests
32-
run: make test
22+
- run: pip install -r requirements.txt
23+
- uses: rhysd/action-setup-vim@v1
24+
id: vim
25+
- run: make lint
26+
env:
27+
VIM: ${{ steps.vim.outputs.executable }}
28+
29+
test:
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
vim:
34+
- version: stable
35+
neovim: false
36+
- version: v8.2.0000
37+
neovim: false
38+
- version: stable
39+
neovim: true
40+
41+
name: "test (${{ matrix.vim.neovim && 'neovim' || 'vim' }} ${{ matrix.vim.version }})"
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: rhysd/action-setup-vim@v1
46+
id: vim
47+
with:
48+
neovim: ${{ matrix.vim.neovim }}
49+
version: ${{ matrix.vim.version }}
50+
- run: make test
51+
env:
52+
VIM: ${{ steps.vim.outputs.executable }}

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
VIM ?= vim
2+
13
.PHONY: lint test
24

35
all: lint test
46

57
lint: .bundle/vim-vimhelplint
68
vint -s after autoload ftdetect ftplugin indent syntax
7-
vim -esN --not-a-term --cmd 'set rtp+=.bundle/vim-vimhelplint' \
9+
$(VIM) -esN --cmd 'set rtp=.bundle/vim-vimhelplint' \
810
-c 'filetype plugin on' \
911
-c 'e doc/graphql.txt' \
1012
-c 'verb VimhelpLintEcho' \
1113
-c q
1214

1315
test: .bundle/vader.vim .bundle/vim-javascript
14-
cd test && vim -EsNu vimrc --not-a-term -c 'Vader! * */*'
16+
cd test && $(VIM) -EsNu vimrc -c 'Vader! * */*'
1517

1618
.bundle/vader.vim:
1719
git clone --depth 1 https://github.com/junegunn/vader.vim.git .bundle/vader.vim

0 commit comments

Comments
 (0)