ci: don't want to run tests silently #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Vader Integration Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install Vim | |
run: sudo apt-get install vim neovim | |
- name: Download Dependencies | |
run: | | |
git clone https://github.com/junegunn/vader.vim.git | |
wget https://github.com/rgoulter/c-worksheet-instrumentor/releases/download/v0.2.6/c-worksheet-instrumentor-0.2.6.tar | |
tar -xf c-worksheet-instrumentor-0.2.6.tar | |
- name: Setup Vim Config init.vim | |
run: | | |
echo <(cat << VIMRC > init.vim | |
set rtp+=vader.vim | |
set rtp+=. | |
filetype plugin indent on | |
VIMRC | |
) | |
- name: Demonstrate C Worksheet | |
run: | | |
# Uploaded release compiled with recent Java. | |
export JAVA_HOME=$JAVA_HOME_21_X64 | |
c-worksheet-instrumentor-0.2.6/bin/c-worksheet-instrumentor <(cat << EOF | |
#include <stdio.h> | |
int main(int argc, char **argv) { | |
printf("Hello World\n"); | |
} | |
EOF | |
) | |
- name: Test Vim | |
run: | | |
# Uploaded release compiled with recent Java. | |
export JAVA_HOME=$JAVA_HOME_21_X64 | |
export PATH=c-worksheet-instrumentor-0.2.6/bin:$PATH | |
vim -Es -Nu init.vim -c 'Vader! test/*.vader' | |
timeout-minutes: 2 | |
- name: Kill Server | |
run: | | |
pkill --signal SIGTERM --full 'edu.nus.worksheet.WorksheetifyServer' || true | |
while pgrep --full 'edu.nus.worksheet.WorksheetifyServer' > /dev/null; do | |
sleep 0.5 | |
done | |
- name: Test Vim (with bad c-worksheetify-server) | |
run: | | |
export PATH=test/bad_server_command:$PATH | |
vim -Es -Nu init.vim -c 'Vader! test/bad_server_command/*.vader' | |
timeout-minutes: 2 | |
- name: Test Vim (with c-worksheetify-server not on PATH) | |
run: | | |
vim -Es -Nu init.vim -c 'Vader! test/command_not_found/*.vader' | |
timeout-minutes: 2 | |
- name: Test NeoVim | |
run: | | |
# Uploaded release compiled with recent Java. | |
export JAVA_HOME=$JAVA_HOME_21_X64 | |
export PATH=c-worksheet-instrumentor-0.2.6/bin:$PATH | |
nvim -Es -u init.vim -c 'Vader! test/*.vader' | |
timeout-minutes: 2 | |
- name: Kill Server | |
run: | | |
pkill --signal SIGTERM --full 'edu.nus.worksheet.WorksheetifyServer' || true | |
while pgrep --full 'edu.nus.worksheet.WorksheetifyServer' > /dev/null; do | |
sleep 0.5 | |
done | |
- name: Test NeoVim (with bad c-worksheetify-server) | |
run: | | |
export PATH=test/bad_server_command:$PATH | |
nvim -Es -u init.vim -c 'Vader! test/bad_server_command/*.vader' | |
timeout-minutes: 2 | |
- name: Test NeoVim (with bad c-worksheetify-server) | |
run: | | |
export PATH=test/bad_server_command:$PATH | |
nvim -Es -u init.vim -c 'Vader! test/bad_server_command/*.vader' | |
timeout-minutes: 2 |