-
Notifications
You must be signed in to change notification settings - Fork 523
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
Adding documentation for pure swift package unit testing #1198
base: master
Are you sure you want to change the base?
Conversation
Adding example for running unit tests on a pure swift package (SPM)
Adding notes for package_path
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Hi @tmaly1980 👋 Thanks for improving fastlane docs!
This PR touches a file in the /generated/
folder, which means it will be overwritten on the next deploy. You want to actually change code here: https://github.com/fastlane/fastlane/blob/0495da3504f8506587161c5ffb468f9694e65635/fastlane/lib/fastlane/actions/run_tests.rb#L93
Could you open a PR on fastlane main repo instead, updating the code above? When you do so, please close this one as it will be obsolete 🙏
Thanks again!
```ruby | ||
# run tests on a pure swift package (SPM), no xcodeproj or xcworkspace required | ||
run_tests( | ||
package_path: ".", |
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.
Perhaps provide a more didactic example here? Like:
package_path: ".", | |
package_path: "/path/to/package/directory" # The path to the directory where your Package.swift is in |
# run tests on a pure swift package (SPM), no xcodeproj or xcworkspace required | ||
run_tests( | ||
package_path: ".", | ||
scheme: "MySwiftCode-Package", # Must have -Package |
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.
Same here, e.g.:
scheme: "MySwiftCode-Package", # Must have -Package | |
scheme: "MySwiftPackage-Package", # Append "-Package" to your Swift Package name |
result_bundle: true, # Last two lines may be required for proper xcresults output | ||
output_directory: Dir.pwd + "/test_output" |
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.
Perhaps this would be better formatted like this?
result_bundle: true, # Last two lines may be required for proper xcresults output | |
output_directory: Dir.pwd + "/test_output" | |
# These last two lines may be required for proper .xcresult output: | |
result_bundle: true, | |
output_directory: Dir.pwd + "/test_output" |
The docs for unit testing pure swift packages was not clear, this adds some use cases to make it more obvious.
NOTE: I just noticed the comment about saying this is not the correct location to submit a PR since it's autogenerated, but I cannot find the proper location. I cannot find run_tests anywhere in the docs repo and I don't see the markdown file anywhere in the primary fastlane repo. Please advise.