Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 34 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,42 @@ on:
- master

jobs:
checks:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: raven-actions/actionlint@v2
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install vim
run: |
sudo add-apt-repository ppa:jonathonf/vim
sudo apt install vim
- name: Run lint
run: |
pip install -r requirements.txt
make lint
- name: Run tests
run: make test
- run: pip install -r requirements.txt
- uses: rhysd/action-setup-vim@v1
id: vim
- run: make lint
env:
VIM_EXE: ${{ steps.vim.outputs.executable }}

test:
strategy:
fail-fast: false
matrix:
vim:
- version: stable
neovim: false
- version: v8.2.0000
neovim: false
- version: stable
neovim: true

name: "test (${{ matrix.vim.neovim && 'neovim' || 'vim' }} ${{ matrix.vim.version }})"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rhysd/action-setup-vim@v1
id: vim
with:
neovim: ${{ matrix.vim.neovim }}
version: ${{ matrix.vim.version }}
- run: make test
env:
VIM_EXE: ${{ steps.vim.outputs.executable }}
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
VIM_EXE ?= vim

.PHONY: lint test

all: lint test

lint: .bundle/vim-vimhelplint
vint -s after autoload ftdetect ftplugin indent syntax
vim -esN --not-a-term --cmd 'set rtp+=.bundle/vim-vimhelplint' \
$(VIM_EXE) -esN --cmd 'set rtp+=.bundle/vim-vimhelplint' \
-c 'filetype plugin on' \
-c 'e doc/graphql.txt' \
-c 'verb VimhelpLintEcho' \
-c q

test: .bundle/vader.vim .bundle/vim-javascript
cd test && vim -EsNu vimrc --not-a-term -c 'Vader! * */*'
cd test && $(VIM_EXE) -EsNu vimrc -c 'Vader! * */*'

.bundle/vader.vim:
git clone --depth 1 https://github.com/junegunn/vader.vim.git .bundle/vader.vim
Expand Down
Loading