简体   繁体   English

Fastlane 与 Xcode 的集成

[英]Fastlane Integration with Xcode

I am trying to integrate for my sample project UberClone with Fastlane.我正在尝试将我的示例项目 UberClone 与 Fastlane 集成。 I have 3 Targets我有 3 个目标

UberClone优步克隆

UberCloneTest优步克隆测试

UberCloneUITest UberCloneUITest


I created fastfile as below and downloaded fastlane but I need your help for integrate fastlane tests are okay or not.我创建了如下的 fastfile 并下载了 fastlane,但我需要你的帮助来集成 fastlane 测试是否正常。 How can I build this file ?我怎样才能建立这个文件?

  default_platform(:ios)


platform :ios do
# 1
  desc "ui test and unit tests need to check"
# 2
  lane :create_app do
# 3
​    produce
  end
end

To run tests see https://docs.fastlane.tools/getting-started/ios/running-tests/要运行测试,请参阅https://docs.fastlane.tools/getting-started/ios/running-tests/

To run Swiftlint see https://docs.fastlane.tools/actions/swiftlint/要运行 Swiftlint,请参阅https://docs.fastlane.tools/actions/swiftlint/

I'd really recommend reading through the fastlane documentation.我真的建议通读 fastlane 文档。 It can be hard to grasp at first but it gets easier to understand lanes and all the functionality.一开始可能很难理解,但理解车道和所有功能会变得更容易。 See https://docs.fastlane.tools/getting-started/ios/setup/ and I also recommend checking out fastlane's github samples.请参阅https://docs.fastlane.tools/getting-started/ios/setup/ ,我还建议您查看 fastlane 的 github 示例。

For example to run swiftlint and then unit and UI tests run fastlane tests例如运行 swiftlint 然后单元和 UI 测试运行fastlane tests

default_platform(:ios)


platform :ios do

  lane :tests do
    swiftlint()
​    run_tests(scheme: "UberCloneTest")
​    run_tests(scheme: "UberCloneUITest")
  end
end

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM