-
Notifications
You must be signed in to change notification settings - Fork 500
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
Problems getting parallel_tests to work in GitHub Action workflows #841
Comments
Did not head that before. |
Thanks for the link, Michael.
Since we use GitHub Actions, and the linux runners have only two cores, so I turned to implementing parallelism using GitHub Action matrix strategy, with straight rspec and my own grouping of tests per machines. I’m getting great speed out of that… but am getting pushback from our engineering team at not using parallel_tests, they are that fond of it. 😊 One thing which is pertinent to our internal discussion is the status of the parallel_tests gem: I could have sworn that somewhere on your site I read that it is not being actively maintained, because your company is moving away from Ruby/Rails… am I hallucinating?
I had not looked at your Wiki until today, and find it intriguing. Several things are not clear to me in the wiki:
* Will parallel_tests collate the tests run on the two GitHub runner machine’s two cores into a single SimpleCov report?
* For using matrix strategy on GitHub Actions, my code needs to specify an array of group names (for my use simply Group1..Groupn) and the corresponding array of indexes into the group array. I’m hoping that the cpu-parallelization of parallel_tests would not clash with that, do you see any reason that it would?
* The grouping is what intrigues me. Is the ‘test’ argument shown in the wiki the top-level folder of the rspec tree? Also, I would hope that there is no limit on the number of machines, and that you are just using three as an example in the wiki, can you confirm?
I’m at the stage now where I am collecting the multiple SimpleCov result sets (distinguished by the index noted above) and about to make my first pass at collating them into a single report. After that, my intent was to revisit the per-machine load assignment, which I’m currently hardwiring to specified folders per machine, and make that assignment programmatically. This is where, if your grouping function can provide that load balancing, I would turn back to getting parallel_test to work in our GitHub Actions environment.
(I would love to move this discussion to email rather than the parallel_tests issues section, if you’re open to that. The result of our discussion could then be added to the issues section, sort of a ‘squash and merge’ effect. 😊)
From: Michael Grosser ***@***.***>
Reply-To: grosser/parallel_tests ***@***.***>
Date: Friday, February 18, 2022 at 9:44 AM
To: grosser/parallel_tests ***@***.***>
Cc: Robert Ashforth ***@***.***>, Author ***@***.***>
Subject: Re: [grosser/parallel_tests] Problems getting parallel_tests to work in GitHub Action workflows (Issue #841)
Did not head that before.
Best follow https://github.com/grosser/parallel_tests/wiki/Distributed-Parallel-Tests-on-CI-systems or post what exactly you are seeing.
—
Reply to this email directly, view it on GitHub<#841 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASKCCF2EUOS6JLYV25C4YDDU3ZSNPANCNFSM5OYI6VAA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
for singlecov: you'll have to combine singlecov results manually afaik, there might be something in simplecov docs ... alternatively make it generate multiple reports and the combine them something like https://github.com/grosser/cc-amend ... for the other questions: that's just way too much text, sorry but I don't have enough time to dig into all this, please ask small precise questions or try googling around for support |
@grosser One issue we've run into here is that whilst we get the specs to run, each subprocess now lacks environment variables that the parent had and a bunch of specs are now failing |
there is nothing in parallel_tests that removes env vars though ... maybe the issue is that 1 test used to set an env var and then the other used it ? |
@grosser Turns out this happened when I was trying to pass Not entirely sure how to deal with this — perhaps we still need to make it run with 12 cores even if it's restricted to using the equivalent of a third of that. To pass that flag (without passing any other options) I had passed
Here, command became |
should work on latest version |
run a single test in paralell_tests locally and verify that there is an env issue
|
I solved it by setting |
parallel_tests-3.10.0 -> |
@rashforth https://github.blog/changelog/2022-09-01-github-actions-larger-runners-are-now-in-public-beta/ |
We're having problems getting parallel_tests to work in GitHub Action workflows. Is this a known issue, or does anyone have any examples of correct commands to use in the workflow?
The text was updated successfully, but these errors were encountered: