Skip to content

ci: Exit in error if 'rspec/rspec_last_run_results.txt' isn't there

What does this MR do and why?

It was discovered today that the rspec/rspec_last_run_results.txt file can sometimes be absent after RSpec has finished running.

Unfortunately, our retry_failed_rspec_examples function assumed the file always exists, and thus run no examples if it's not there, leading to a successful exit of RSpec, while there actually were test failures.

In that case, we now early exit with an error status without retrying so that the job status reflects RSpec exit code.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rémy Coutable

Merge request reports