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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
run setup_keychain on macOS environments only #16733
run setup_keychain on macOS environments only #16733
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 馃摑 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
鈩癸笍 Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! 鈩癸笍 Googlers: Go here for more info. |
Seems you will need some special handling in the tests as well, as they are run on Linux and Windows as well. |
Hey @seanreinhardtapps , @janpio 馃憢 The According to the source code of a fastlane/fastlane/lib/fastlane/actions/setup_travis.rb Lines 42 to 44 in 5734f46
I had a look at fastlane/fastlane/lib/fastlane/actions/setup_ci.rb Lines 4 to 16 in 5734f46
Taking that into account, I am wondering if @seanreinhardtapps could you please provide a bit more context, ideally a use-case, why and when you need to run |
@mollyIV, @janpio thanks for the reviews on this idea. When I looked into the implementation, I thought it would make more sense to skip the I understand it's not usual to use a linux agent for iOS tests. I'm running a multi-stage Travis config where the last stage runs a docker container on the agent and starts XCUITests on a device farm. Thought it could be just a ruby script, it's scripted into a lane along with all of our other tasks. We had |
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.
I think the addition of platform checking before setting up keychain makes sense! I have a few suggestions on the code in SetupCiAction
and on the tests 馃槉 But once those are fixed I think this should be 馃憤
馃憤 馃憤 Let's also remember to change supported platforms for a fastlane/fastlane/lib/fastlane/actions/setup_travis.rb Lines 42 to 44 in 5734f46
|
@seanreinhardtapps BTW, let me know if you want any help making changes to those tests! I'd be happy to hop in and help 馃槉 |
Thanks for the reviews! PR should be ready for another look. |
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.
This is great! Thank you for making those changes 馃槉 I will get this out in a release later today for you 馃挭
Hey @seanreinhardtapps 馃憢 Thank you for your contribution to fastlane and congrats on getting this pull request merged 馃帀 Please let us know if this change requires an immediate release by adding a comment here 馃憤 |
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.
Congratulations! 馃帀 This was released as part of fastlane 2.151.0 馃殌
* run setup_keychain on macOS environments only * updated test to assert results based on OS * Swap order of checks in setup_keychain * refactor setup_keychain tests to run consistently on all test platforms * updated is_supported? for travis and circle_ci * added missing test setup condition. reorganized nesting of describes
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 validMotivation and Context
setup_travis
fails on the Linux CI agents in the setup_keychain action, throwing an error and failing the task.To run Travis CI lanes on Mac and Linux agents,
setup_travis
must be conditionally run.Since that action only applies to a macOS environment, it could be updated to skip the setup_keychain step on non macOS agents.
馃攽
Description
Exit early out of
setup_keychain
in thesetup_ci
action on non mac-OS envoronments, logging a message that it was skipped.Testing Steps
setup_ci
on a macOS agent without any change in behavior.setup_ci
on a linux agent and see that it no longer fails, and logs "Skipping Keychain setup on non-macOS CI Agent"