-
Notifications
You must be signed in to change notification settings - Fork 91
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
Fix CI passing with failing tests #233
Conversation
IIRC you can have powershell check the $LASTEXITCODE or something similar which gets set when non-powershell processes are run. |
Maybe we can try updating set windows-shell to something like set windows-shell := [
"pwsh.exe",
"-NoLogo",
"-Command",
" & { $cmd = $args -join ' '; Invoke-Expression $cmd; if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } }"
] |
This is issues where powershell stops proccessing everything after the |
c1069db
to
463e31d
Compare
Signed-off-by: Ludvig Liljenberg <[email protected]>
Signed-off-by: Ludvig Liljenberg <[email protected]>
Signed-off-by: Ludvig Liljenberg <[email protected]>
463e31d
to
082f830
Compare
Just wondering if Mark's suggested change is better since IIUC this fix will work for the specific GH job but if the just command is run locally in Windows or from another GH job then the same failure will still be there? |
Mark and I dug a bit deeper into this. Unfortunately this is the only solution we came up with, as the other suggestions did not seem to work. Locally on windows, this doesn't modify anything, and at least on my computer, powershell behaves as expected and exits with the right exit code. If this specific workflow gets invoked from somewhere else, the bash shell will still apply, however if in another workflow someone uses the same just-command without specific a bash-shell, indeed the problem will resurface again. @simongdavies |
yes, i had issues getting anything after |
@ludfjig OK, can we put a comment in the just file somewhere to that effect then? |
Signed-off-by: Ludvig Liljenberg <[email protected]>
3d3854b
to
5dfd64e
Compare
Will just commands continue to work from powershell on Windows machines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if i understand this correctly, the github CI runnings will spawn a bash shell which will run just, which will then spawn powershll shell's for whatever just executes?
Seems odd but if it gets us a better CI signal this works for me.
This only affects ci. Any just commands on windows will still spawn a pwsh shell (even on ci). |
Fixes #138
Somehow pwsh won't always fail the job if a step fail.
This PR cannot merge until the tests are passing