mini.nvim icon indicating copy to clipboard operation
mini.nvim copied to clipboard

mini.test in Github CI on Windows

Open tris203 opened this issue 1 year ago • 2 comments

Contributing guidelines

Module(s)

mini.test

Description

I am trying to use mini.test to run some UI tests on a plugin using GitHub actions on a windows runner.

I am getting the below message:

      descriptions = { "ui", "all" },
     msg = "D:\\tmp\\mini-test/lua/mini/test.lua:2282: (mini.test) Failed to make connection to child Neovim with the following error:\n  Vim:connection failed: connection refused\n\nstack traceback:\n\tD:\\tmp\\mini-test/lua/mini/test.lua:2282: in function 'error'\n\tD:\\tmp\\mini-test/lua/mini/test.lua:1107: in function 'start'\n\tD:\\tmp\\mini-test/lua/mini/test.lua:1140: in function 'restart'\n\tD:/a/hawtkeys.nvim/hawtkeys.nvim/tests/hawtkeys/ui_spec.lua:21: in function 'w'\n\tD:\\tmp\\plenary.nvim/lua/plenary/busted.lua:167: in function 'run_each'\n\tD:\\tmp\\plenary.nvim/lua/plenary/busted.lua:174: in function 'it'\n\tD:/a/hawtkeys.nvim/hawtkeys.nvim/tests/hawtkeys/ui_spec.lua:92: in function <D:/a/hawtkeys.nvim/hawtkeys.nvim/tests/hawtkeys/ui_spec.lua:79>\n"
   }, {

I tried

  • shorten the path as much as possible ( as suggested in the README for other issues)
  • increase the timeout.

Is this even a support test case? Or are there any other debugging suggestions

Thanks

Neovim version

0.9.5 & Nightly

Steps to reproduce

Git hub action run

Min Init

Expected behavior

CI to run sucessfully on windows

Actual behavior

CI Fails on windows

Git hub action run

tris203 avatar Jan 03 '24 00:01 tris203

Thanks for the suggestion!

I could not make 'mini.test' reliably work on Windows. Mainly because I don't have proper access to a Windows machine to figure out what needs to be done.

So right now only Linux (and probably MacOS) are supported. I thought there was a note in documentation, but couldn't find it. I'll add it later.

echasnovski avatar Jan 03 '24 09:01 echasnovski

I forked mini.test, and changed it from using pipe to tcp for the connect.

This has fixed the error, but now it just spits out a seemingly random string. or a string that i cant make any sense of

========================================	
Testing: 	D:/a/hawtkeys.nvim/hawtkeys.nvim/tests/hawtkeys/ui_spec.lua	
2004hu1004h

and then exits with code 1

tris203 avatar Jan 03 '24 19:01 tris203

@tris203, thanks to the solution in #1101, 'mini.test' on latest main branch now supports testing on Windows machines.

echasnovski avatar Aug 10 '24 16:08 echasnovski