forked from Archives/vimux
Add CI workflow to actually test-drive Vimux
parent
1b38911c40
commit
fb43fcbc16
@ -0,0 +1,38 @@
|
|||||||
|
name: Check
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
vimFlavor: ["vim", "nvim"]
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Enable Universe package repository
|
||||||
|
run: |
|
||||||
|
sudo add-apt-repository universe
|
||||||
|
sudo apt-get update
|
||||||
|
- name: Install tmux and ${{ matrix.tagsProvider }}
|
||||||
|
run: |
|
||||||
|
sudo apt-get install tmux ${{ matrix.vimFlavor == 'nvim' && 'neovim' || 'vim' }}
|
||||||
|
- name: Review versions
|
||||||
|
run: |
|
||||||
|
tmux -V
|
||||||
|
${{ matrix.vimFlavor }} --version
|
||||||
|
# This tests looks for two thigs:
|
||||||
|
# * That VIM doesn't hang. If it succedes it will quit quickly. If 5
|
||||||
|
# seconds later the tmux session is still running either the runner pane
|
||||||
|
# didn't get closed or (more likely) we threw some error and VIM is
|
||||||
|
# sitting there expecting us to acknowledge the message(s).
|
||||||
|
# * That VIM exited normally. This check isn't very useful since :qa
|
||||||
|
# never bubbles up an error, but if someday we use :cq for a test being
|
||||||
|
# ready to check the exit code seems like a good thing.
|
||||||
|
- name: "Try Vimux"
|
||||||
|
run: |
|
||||||
|
ec="$(mktemp)"
|
||||||
|
tmux new -s ci -d "${{ matrix.vimFlavor == 'nvim' && 'nvim -u /dev/null --headless' || 'vim' }} -i NONE \"+so plugin/vimux.vim\" \"+VimuxRunCommand('date')\" \"+VimuxCloseRunner | qa\"; echo \$? > '$ec'"
|
||||||
|
sleep 5
|
||||||
|
tmux kill-session -t ci && exit 1
|
||||||
|
exit "$(cat $ec)"
|
Loading…
Reference in New Issue