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

Optional support for Quick + Nimble testing via Cocoapods #58

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

KieranHarper
Copy link
Contributor

Couple of things here:

  1. Added an optional folder for storing things that aren't part of the copy-paste template unless you opt into them via the prompts.
  2. Added a prompt about using Cocoapods in general - provides a file ready for dependencies to be added and initialises the workspace.
  3. Added a prompt about using Quick and Nimble via Cocoapods - uses an alternative starting podfile.
  4. Added those dependencies to the package manager file if you opt into Q+N.

That last point creates a slight problem if you want to test via swift test you'll end up having those dependencies included when you swift build as well, which isn't ideal. It's a known issue for SPM that's being worked on (I'm not completely across the status tho). I've included it here by default because it means this can hit all platforms, but people can also delete it if they're happy to just test through Xcode. If you merge this PR I'll create an issue to track that.

The test lane does a regular build for the watchOS target (because there aren't any tests), then does a build+test (aka scan) step for the other 3 targets. Unwanted targets can be removed and extra iOS devices can be added easily. Useful for CI because all you have to do is run `fastlane test`.
…the workspace if project wants to use cocoa pods.
…en copying.

The idea is that items in the optional folder can be selectively copied depending on the answers to questions / what the project needs.
Only gets copied from the "optional" folder if the user says yes to it.
Architectures need to match between project targets and pod targets, and the one that makes sense as a default is for debug to build the active one only. Without this the iOS target is the odd one out that wants to build all architectures, and pods doesn't agree with that.
…en copying.

The idea is that items in the optional folder can be selectively copied depending on the answers to questions / what the project needs.
Only gets copied from the "optional" folder if the user says yes to it.
… aware of it as well.

The downside of this is you can't currently have testing without including Q+N as dependencies for building as well. Not sure that SPM supports that at the moment, the conversation suggests not yet.
@KieranHarper KieranHarper mentioned this pull request May 13, 2017
@kiliankoe
Copy link
Contributor

FYI, Swift 4's SPM now supports test dependencies 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants