Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallel_test gem experimentation #5628

Merged
merged 1 commit into from
May 10, 2024

Conversation

elasticspoon
Copy link
Collaborator

@elasticspoon elasticspoon commented Apr 16, 2024

Uses parallel_tests gem to run tests in parallel in CI. Parallelizes the tests across 4 CPU cores on each Github Action and across 3 runners. Additional runners did not seem useful, the setup time was starting to be as long as the test time.

As a result the RSpec run time was cut down from around 7:30 to 3:10.

Changes in Test Output

Since the test output is now spread across multiple runners we want to have a way to combine those outputs back together into a single useful result. Long story short it will look something like this:

Success:
image

Failure:
image

Docker

I was unable to do a similar thing for docker. This issue with docker is the setup for docker compose takes almost 2 mins, which means even with many runners the tests will be spending nearly as much time setting up as testing.

Notes

Rspec is marked as a required check. This will need to be changed to Continuous Integration.

@github-actions github-actions bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Apr 16, 2024
@elasticspoon elasticspoon force-pushed the parallel-tests branch 8 times, most recently from 30bb5df to c8855fd Compare April 21, 2024 02:03
@elasticspoon elasticspoon force-pushed the parallel-tests branch 11 times, most recently from 4614341 to ccc251a Compare May 6, 2024 21:22
Adds parallel_tests gem to make tests parallel in CI

Secrets can't be passed to forks, so lets try and remove
the runtime log stuff from forked workflows.
@elasticspoon elasticspoon force-pushed the parallel-tests branch 3 times, most recently from 5917222 to 6612036 Compare May 8, 2024 19:32
@elasticspoon elasticspoon marked this pull request as ready for review May 8, 2024 19:37
@@ -555,15 +559,10 @@ GEM
zeitwerk (2.6.13)

PLATFORMS
arm64-darwin-20
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove these?

Copy link
Collaborator

@compwron compwron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it its working, let's merge!

@compwron compwron merged commit 462c77d into rubyforgood:main May 10, 2024
16 checks passed
@elasticspoon elasticspoon deleted the parallel-tests branch May 12, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants