Start United States USA — software Ruby on Rails Minitest on Github Actions: Parallel Testing

Ruby on Rails Minitest on Github Actions: Parallel Testing

230
0
TEILEN

For Ruby on Rails, learn how to use Github Actions build matrices to divide Minitest files between jobs and run the test suite much faster.
Join the DZone community and get the full member experience. How to run Ruby on Rails tests in Minitest on Github Actions? What to do if tests are slow? How to manage complex workflows? You can use Github Actions build matrices to divide Minitest files between jobs and run the test suite much faster. If your Minitest tests are taking dozens of minutes and you would like to save some time for your Ruby engineering team then you could use tests parallelization on your CI server. To run tests as fast as possible you need to split them into equal buckets (into parallel jobs). But how to do it? Some of the test files can be super fast to execute, other Minitest files can take minutes if they run system tests (E2E tests). There is also an aspect of preparing the test environment for each parallel job. By preparing I mean you need to clone a repository, install ruby gems or load them from a cache, maybe you need to load some docker container, etc.

Continue reading...