You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vim-vimux/.github/workflows/check.yml

39 lines
1.5 KiB
YAML

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)"