I am running unit tests under Earthly and everything is perfect when the unit tests succeed - a junit.xml file is written via an 'SAVE ARTIFACT AS LOCAL' statement and can be picked up by our CI server. However, when a test fails the command also fails and Earthly returns a non-zero exit code back to our CI server (which is good) but no output is written, so the CI server is unable to show which tests have failed.
Is there a way to force output to be written despite the build not succeeding?
I could get the command to return zero but then I would have to find a way to fail the CI build as the CI server (Gitlab) uses exit codes to determine the success/failure of a build.
Thanks
EDIT(by @vladaionescu): See workaround in this comment.
EDIT2(by @vladaionescu): A partial solution has been implemented. See this comment.
I am running unit tests under Earthly and everything is perfect when the unit tests succeed - a junit.xml file is written via an 'SAVE ARTIFACT AS LOCAL' statement and can be picked up by our CI server. However, when a test fails the command also fails and Earthly returns a non-zero exit code back to our CI server (which is good) but no output is written, so the CI server is unable to show which tests have failed.
Is there a way to force output to be written despite the build not succeeding?
I could get the command to return zero but then I would have to find a way to fail the CI build as the CI server (Gitlab) uses exit codes to determine the success/failure of a build.
Thanks
EDIT(by @vladaionescu): See workaround in this comment.
EDIT2(by @vladaionescu): A partial solution has been implemented. See this comment.