WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
392 stars 631 forks source link

Add rspec-retry configuration to improve CI stability #6029

Closed wulanseruniati closed 3 weeks ago

wulanseruniati commented 3 weeks ago

What this PR does

< This PR breakdowns the issue #1476

This pull request introduces rspec-retry configuration to improve the reliability of the test suite on CI. By adding rspec-retry, we can reduce the number of intermittent failures in specs, which will help stabilize CI builds and prevent unnecessary disruptions.

Changes Made Configured rspec-retry: Added retry settings to spec/spec_helper.rb to re-run failed specs up to 3 times in CI environments (ENV['CI'] is set). This should address flaky specs that occasionally fail due to timing issues or other transient factors. Set retry options: Verbose retry logging is enabled to make it easier to trace retries in CI output, along with failure messages for each retry attempt.

Testing & Verification The configuration has been tested locally, and the coverage report shows the expected files are being covered. Additionally, a screenshot of the coverage report is attached to verify that the setup was successful.

Screenshots

After: Screenshot 2024-11-03 180559

ragesoss commented 3 weeks ago

Thanks! I think at this time, I don't want to use rspec-retry for this... we've got an upcoming internship project that will be focused on improving the test suite, so hopefully we can handle it at a more fine-grained level. Near the end of that project, if intermittent failures that are out of our control are still happening, that might be time to consider this change. Meanhwhile, I'm going to close the issue.