Skip to content
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 2 commits into from
Dec 9, 2021

Conversation

garyttierney
Copy link
Contributor

@garyttierney garyttierney commented Dec 1, 2021

NOTE: still WIP.

Check list

  • I have read through the README (especially F.A.Q section)
  • I have searched through the existing issues or pull requests
  • I have verified all existing unit tests pass (See the README on how to run)
  • I have added new tests if appropriate
  • I have performed a self-review of my code and commented hard-to-understand areas
  • I have made corresponding changes to the documentation (when necessary)

Description

This is an attempt to get the unit tests running under Windows in CI to hopefully help with testing issues like #109. There's a few kinks to iron out, so I've opened this as a draft until I get it passing. Ideally it'll remain mostly the same, with just the code-minimap stub and paths to neovim plugins changing.

Type of change

  • Bug fix
  • New feature
  • Improvement of existing features
  • Refactor
  • Breaking change
  • Documentation change
  • CI / CD

Test environment

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:
  • Vim
    • Neovim:
    • Vim:

@garyttierney garyttierney changed the title Feat/windows ci Set up Windows runner for unit tests CI job Dec 1, 2021
@garyttierney garyttierney marked this pull request as ready for review December 1, 2021 19:19
@garyttierney
Copy link
Contributor Author

garyttierney commented Dec 1, 2021

Ah, appears that CI won't run if it's a draft PR. I've marked it ready for review but left a note indicating it's still WIP.

Hm, nevermind. I think I don't have permission to change and run the workflow like this in a pull request. I'll create a new repository on my own account and test there before re-opening this.

@garyttierney
Copy link
Contributor Author

This is running correctly now, but an issue in vim-testify prevents me overriding g:testify#logger#type to get good test result output. I'll try get that fix upstream.

@ZNielsen
Copy link
Collaborator

ZNielsen commented Dec 3, 2021

Just to make sure I understand the scope - this is intended to run the unit tests on Windows, but it does not fix the unit tests, correct?

- 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') }}
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@garyttierney
Copy link
Contributor Author

Just to make sure I understand the scope - this is intended to run the unit tests on Windows, but it does not fix the unit tests, correct?

That's right. I'd hoped to look at them after finishing this but went down the rabbit hole of fixing vim-testify to get test results from it in CI. Unless you get to them before I wrap this branch up I'll take a look once I've got this producing good output.

@ZNielsen ZNielsen merged commit 9af9083 into wfxr:master Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants