echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.74k stars 178 forks source link

mini.test in Github CI on Windows #636

Closed tris203 closed 2 weeks ago

tris203 commented 7 months ago

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

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

echasnovski commented 7 months ago

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.

tris203 commented 7 months ago

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

echasnovski commented 2 weeks ago

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