Open ceedubs opened 3 years ago
There isn't, to my knowledge. My first thought is that we could change the ucm run
command to pass through an exit code if the type of the specified program is Byte
or {IO} Byte
.
Or we could add a ucm test
command that takes in a namespace, runs the tests, and returns 1 if any tests fail; the first is more general.
@aryairani my initial reaction is that a ucm test
command makes a lot of sense. This is likely a common flow, so it probably makes sense to make it easy.
My afterthought is that maybe I'm used to other languages and this sort of thing isn't as necessary or there's a better approach with Unison. But I don't yet have any good ideas for what that would be :)
Why not both! π
ucm test
probably makes as much sense as the interactive test
command, and we like that so far.
I thought that I might try to add a simple GitHub Actions CI for https://github.com/ceedubs/unison-foldl and I'm not sure how to run the tests in a way that will trigger a failed CI.
For example, I've added a failing test under
foldl.failingtest
. I'm not sure if there's a better way, but I'm using a heredoc to try to run the tests within ucm:As you can see, the return value is 0 even though there's a failing test. Is there a way to capture the fact that at least one test failed?