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
[action][spm] add parallel
option
#21665
[action][spm] add parallel
option
#21665
Conversation
Support for ruby 3.2 was just added in CI. It should be resolved now. Thanks for the contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
@lacostej Happy to contribute after using fastlane for a long time! Is there anything left for me to do to get this merged? |
@bramschulting one last idea: maybe we could add
in the example section. |
parallel
option
Good one, done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perrrfect test cases!! Thank you! ❤️
I just made a minor suggestion regarding the action options 😊 I'll go ahead and apply them, and if the tests pass, this should be good to go!
Great contribution! 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
(Just waiting for tests to pass)
Thanks @lacostej and @rogerluan! |
* Add parallel option to spm action * Add parallel test example * Change boolean option from optional to default false. --------- Co-authored-by: Roger Oba <rogerluan.oba@gmail.com>
I think something is wrong with my local setup, because if I runThis is resolved. I was using ruby 3.2.2 and with that the tests fail. But I noticed the CI uses 3.1 so I tried again locally with 3.1.2 and now they pass.bundle exec rspec
on a clean clone of the fastlane repo on themaster
branch, I still get some failures:Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
swift test
allows parallel testing by passing the--parallel
option. This reduces the time it takes to run the tests in a project. (In my case the time drops from 822 seconds to 133 seconds)Description
A
parallel
option has been added to theSpmAction
action. If this options is set totrue
and thecommand
is"test"
, the--parallel
flag will be added to the command.This functionality has been tested by using my local fastlane setup in a real project.
There is one small issue: when the tests are run in parallel, there seems to be no output to fastlane while the tests are running. When the tests complete (either successfully or as a failure), the output is shown. I don't know how to resolve this, so if anyone has an idea, feel free to let me know! But otherwise I think it's a tradeoff users of the
parallel
flag can make. I suspect the issue is that when running the tests with the--parallel
option, output is not 'appended', but there's only one line that's constantly being removed and rewritten. You can see this happening when runningswift test --parallel
directly.Testing Steps
Create a lane that uses the
spm(command: 'test', parallel: true)
action.