Skip to content

Commit

Permalink
ci: add GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoulter committed May 17, 2024
1 parent 4c80e0c commit 61b7271
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/vader-vim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
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: 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 <(cat << VIMRC
set rtp+=vader.vim
set rtp+=.
filetype plugin indent on
VIMRC
) -c 'silent Vader! test/*'
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 <(cat << VIMRC
set rtp+=vader.vim
set rtp+=.
filetype plugin indent on
VIMRC
) -c 'silent Vader! test/*'
timeout-minutes: 2

0 comments on commit 61b7271

Please sign in to comment.