opened
joshrabinowitz
username_0
experiment with travis-ci and windows
simple test for travis-ci windows support
issue
created
joshrabinowitz
username_0
@username_2 @username_1 @simbo1905 

I've been trying to set up this test of git-secret on travis-ci's windows build environment <https://docs.travis-ci.com/user/reference/windows/> but keep having issues executing scripts with `bash` (see PR). Help?

I'd like to get git-secret windows builds going for windows PRs , tests and possibly releases. Please take a look a the PR and the travis-ci windows output and see if you can spot anything wrong. Thank you.
comment
created
Mohjive
username_1
@username_0 I did try to run the tests the other day and one issue I found is that `ps` has incompatible options under git for windows version of bash.
The other was that I had to install **bats** (installed it from git).
comment
created
Mohjive
username_1
and what I can see from the travis docs it uses git bash, so it should use the same environment (and no need to install bash separately).
comment
created
sobolevn
username_2
Sorry, @username_0, but I do not have any experience with Windows (I am lucky man).
Maybe we can ask for help in https://travis-ci.community/c/environments/windows ?
comment
created
Mohjive
username_1
It’s impossible to follow any process. Make it work on your machine with git for windows first and make that one commit and **then** push that one change. I cannot give any feedback on these commits, because the signal to noise ratio is way too low.
comment
created
joshrabinowitz
username_0
@username_1 Thanks for taking a look at the PR.

To raise the signal: the current problem has to do with subshells finding various commands at run time; all the recent changes to this branch have been around the PATH env variable. You can see the problems, which all relate to this, at the end in the recent 'windows' outputs from this PR in travis-ci. One issue I find especially vexing is that `utils/tests.sh` has issues using a `#!/usr/bin/env bash` line.

If you wanted to take a crack at making a branch work on travis from your machine like you say, that would be great, it's been surprisingly difficult to get travis-ci windows builds this far. You could start either from my branch or master.  I get that the commit trail might not be helpful, but if you look at the overall diff (41 lines with debug output) I think the intent is pretty clear. 

I've been avoiding using a windows machine/vm here so far, thus the numerous commits. Obviously they'll all get squashed before merge.

Once I get the tests to run, I'll look at the `ps` issue, thanks for bringing that up too.
comment
created
Mohjive
username_1
Looking at the output from Travis I’d say that it has to do with spaces in paths and the mix of `:` and `;` as path separators. But I don’t have any good advice at how to solve it.
comment
created
joshrabinowitz
username_0
Hm, maybe it is related to the spaces. 

Looking at https://travis-ci.org/username_2/git-secret/jobs/500846698, I'm using `;` as separator on windows and `:` on linux, so I'm pretty sure that's not the problem.

It'd be really preferable to get windows travis-ci tests working so we can test your PR like the rest of the features. So if you do have a few cycles to get git-secret's `make test` further along on travis-ci/windows that would be great. We can temporarily skip some tests on windows if it makes sense because of `ps` differences.
comment
created
Mohjive
username_1
I can probably put some time into this, when I have access to a windows machine again (after the weekend)
comment
created
joshrabinowitz
username_0
Ok, I reverted the code that was trying to special-case the PATH var on windows; I wasn't progressing.

This PR is pretty close to as little changes as needed for travis-ci and windows, but doesn't work as you can see at https://travis-ci.org/username_2/git-secret/jobs/500921592

I don't know what's going on with things not finding `bash`; according to #40 (windows support) this seems like it should just work.
comment
created
Mohjive
username_1
I made a PR to your branch for this PR
comment
created
Mohjive
username_1
@username_0 I made a PR to your path for this PR
comment
created
joshrabinowitz
username_0
this PR is being closed, #374 has all the changes in this PR along with PATH and `ps` fixes from @username_1
comment