Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Fix a build step when there are no tests to execu…
…te (#165929) ## Summary Fixes failed build steps when there are no tests to execute and hence no reports. ## Details Despite this [PR](#165824) fixes tests failure when there are no reports but `yarn junit:merge` tries to convert them to junit format the problem is partially stays as `Failed Test Reporter` runs for every build step meaning also for successful build steps. We don't need to handle failed test reports for successful build steps. There are cases when there are no tests to run so Cypress doesn't produce reports and nothing is converted to junit format so `Failed Test Reporter` fails and causes a build step to fails. It could be solved by defining an environment variable `DISABLE_MISSING_TEST_REPORT_ERRORS=true` but we need to make sure reports exist for failed tests. Taking this into account we can rely on `BUILDKITE_COMMAND_EXIT_STATUS` to avoid running `Failed Test Reporter` if the build step successed. One may ask why don't skip `Upload Artifacts` too. We may need some build artifacts for successful build steps. --------- Co-authored-by: Tiago Costa <[email protected]>
- Loading branch information