todotxt / todo.txt-cli

☑️ A simple and extensible shell script for managing your todo.txt file.
http://todotxt.org
GNU General Public License v3.0
5.56k stars 713 forks source link

Github Actions - Windows #352

Open karbassi opened 3 years ago

karbassi commented 3 years ago

Before submitting a pull request, please make sure the following is done:

karbassi commented 3 years ago

I don't have a windows device or vm. Can someone update the tests to make sure they run?

Also, do we want to support Windows?

@inkarkat @ginatrapani

inkarkat commented 3 years ago

So it's just some completion tests that fail on Windows? It should be possible to fix that.

Years ago, I've also used todo.sh on Windows / Cygwin, and I still remember that the tests succeeded back then. Extending the test coverage to Windows would be great; I think some folks have installed Cygwin just for that.

I also don't have easy access to a Windows + Cygwin system any longer; maybe I'll still find some system.

inkarkat commented 3 years ago

I was able to run the tests on a Microsoft Windows Server 2018 system (so actually quite close to the Windows 2019 used by the CI), with Cygwin 64-bit. All tests succeeded!

Looking more closely, I think the CI is just using the Bash that's provided with Git, and the corresponding mingw32 tools (unfortunately, Bash doesn't identify itself, but I see mingw32-make).

For me, in the past, todo.sh on Windows always meant Cygwin. I'm not sure whether there's a Windows + Cygwin system available for CI; bootstrapping Cygwin each time doesn't sound attractive. On the other hand, mingw32 might be sufficient to run todo.sh (maybe with some adaptations to the tests); I think I can obtain another Windows VM with Git Bash; will check on Monday.

karbassi commented 3 years ago

windows-latest is Microsoft Windows Server 2019 with the following installed. https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md

Bash 4.4.23(1)-release

Looking at the test for make test, it looks like it is running on PowerShell. https://github.com/todotxt/todo.txt-cli/pull/352/checks?check_run_id=3244083563#step:5:3

> make test
 shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"