Skip to content

Commit

Permalink
Set up Windows runner for unit tests CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
garyttierney committed Dec 1, 2021
1 parent 35c0dd7 commit 5befe71
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI
on: [push, pull_request]
on: [ push, pull_request ]

jobs:
lint:
Expand All @@ -17,25 +17,49 @@ jobs:
pre-commit run --all-files || { git diff --color=always && exit 1; }
unit-tests:
name: Unit Tests
runs-on: ubuntu-20.04
strategy:
matrix:
os: [ windows-2022, ubuntu-20.04 ]
include:
- os: windows-2022
NEOVIM_CONFIG_PATH: ~/AppData/Local/nvim
- os: ubuntu-20.04
NEOVIM_CONFIG_PATH: $HOME/.config/nvim
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup Vim
uses: rhysd/[email protected]
with:
neovim: true
- name: Ensure plugins directory exists
env:
NEOVIM_CONFIG_PATH: '${{ matrix.NEOVIM_CONFIG_PATH }}'
run: |
mkdir -p $HOME/.config/nvim/plugins
mkdir -p $NEOVIM_CONFIG_PATH/plugins
- name: Create a fake code-minimap executable
# Necessary for minimap.vim to start up
run: |
mkdir -p "$HOME/bin"
ln -s /bin/echo "$HOME/bin/code-minimap"
echo "$HOME/bin" >> $GITHUB_PATH
if: ${{ !contains(matrix.os, 'windows') }}

- name: Create a fake code-minimap executable (Windows)
run: |
mkdir -p ~/bin
cp C:/Windows/System32/doskey.exe ~/bin/code-minimap.exe
if: ${{ contains(matrix.os, 'windows') }}

- name: Checkout Testify
run: |
git clone --depth 1 https://github.com/dhruvasagar/vim-testify $HOME/.config/nvim/plugins/vim-testify
git clone --depth 1 https://github.com/dhruvasagar/vim-testify ${{ matrix.NEOVIM_CONFIG_PATH }}/plugins/vim-testify
env:
NEOVIM_CONFIG_PATH: '${{ matrix.NEOVIM_CONFIG_PATH }}'
shell: bash
- name: Run Unit Tests
run: |
nvim -c "set rtp+=$HOME/.config/nvim/plugins/vim-testify" -c "set rtp+=./" -S $HOME/.config/nvim/plugins/vim-testify/plugin/testify.vim -S ./plugin/minimap.vim +TestifySuite
nvim -c "set rtp+=$NEOVIM_CONFIG_PATH/plugins/vim-testify" -c "set rtp+=./" -S $NEOVIM_CONFIG_PATH/plugins/vim-testify/plugin/testify.vim -S ./plugin/minimap.vim +TestifySuite
shell: bash
env:
NEOVIM_CONFIG_PATH: '${{ matrix.NEOVIM_CONFIG_PATH }}'

0 comments on commit 5befe71

Please sign in to comment.