-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up Windows runner for unit tests CI job #126
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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: | ||
|
@@ -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 }}' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these
if
gates have to be at the bottom? It would be nice if it was the first part of the yaml section.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, I've moved them to the first key in the block. Let's see if GitHub accepts it.