尝试最小化CI的内部版本数

时间:2019-04-02 10:39:53

标签: ios circleci fastlane

我正在使用带有Fastlane(v2.119.0)的CircleCI对签名,构建,测试和提交我的应用程序进行testflight编码。我正在尝试在使用gym创建的版本上运行测试,但是无法正常工作。

这是我的Fastfile配置:

default_platform(:ios)

platform :ios do
  before_all do
    setup_circle_ci
  end

  desc "Runs all the tests"
  lane :beta do
    match(
        app_identifier:["com.myapp.ios","com.myapp.ios.OneSignalNotificationServiceExtension"],
        type: "appstore",
        readonly: is_ci
    )
    gym(
        scheme: "MyApp (Production)",
        workspace: "MyApp.xcworkspace",
        silent: true,
        derived_data_path: "DerivedData"
    )
    run_tests(
      workspace: "MyApp.xcworkspace",
      devices: ["iPhone Xs"],
      scheme: "MyApp (Production)",
      clean: false,
      derived_data_path: "DerivedData",
      test_without_building: true
    )
    pilot(skip_waiting_for_build_processing: true)
  end
end

我的应用程序中有两种不同的方案-MyApp (Staging)MyApp (Production)。在上述beta通道中应该发生的是匹配代码符号-可以正常工作。然后gym应该使用MyApp (Production) Release (Production)配置为我的工作区构建应用程序。然后,应将此版本保存到文件夹DerivedData中,然后应在此保存的版本上运行测试。

但是,实际上发生的是该应用的构建,然后当它到达run_tests时,却无法显示:

Testing failed:
MyAppTests:
MyApp.app encountered an error (Failed to install or launch the test runner. (Underlying error: Cannot launch simulated executable: no file found at /Users/distiller/project/DerivedData/Build/Products/Debug (Production)-iphonesimulator/MyApp.app))

问题似乎在于它试图使用Debug配置进行测试,而我却使用Release配置进行构建吗?为什么不按scan文档中的说明默认设置为Release?我怎样才能解决这个问题?同样,看起来“扫描”在/Users/distiller/project/DerivedData/Build/Products寻找TEST_HOST路径,而健身房似乎建立在/Users/distiller/project/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/MyApp (Production)/BuildProductsPath

另一件事是,gym用名称MyApp-Staging.ipa而不是MyApp.ipa保存了我的ipa。为什么?

任何帮助将不胜感激,谢谢!

0 个答案:

没有答案
相关问题