# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane




# default_platform(:ios)

platform :ios do
  desc "run iOS DevCycle tests"
  lane :tests do
    run_tests(
      derived_data_path: "~/Library/Developer/Xcode/DerivedData",
      buildlog_path: "./fastlane/fastlane-buildlog",
      scheme: "DevCycle",
      workspace: "DevCycle.xcworkspace",
      result_bundle: true
    )
  end
end

platform :tvos do
  desc "run tvOS DevCycle tests"
  lane :tests do
    run_tests(
      derived_data_path: "~/Library/Developer/Xcode/DerivedData",
      buildlog_path: "./fastlane/fastlane-buildlog",
      scheme: "DevCycle",
      workspace: "DevCycle.xcworkspace",
      devices: ["Apple TV 4K (3rd generation)"],
      ensure_devices_found: true,
      result_bundle: true
    )
  end
end

platform :watchos do
  desc "run watchOS DevCycle tests"
  lane :tests do
    run_tests(
      derived_data_path: "~/Library/Developer/Xcode/DerivedData",
      buildlog_path: "./fastlane/fastlane-buildlog",
      scheme: "DevCycle",
      workspace: "DevCycle.xcworkspace",
      devices: ["Apple Watch Series 10 (46mm)"],
      ensure_devices_found: true,
      result_bundle: true
    )
  end
end

platform :mac do
  desc "run mac DevCycle tests"
  lane :tests do
    run_tests(
      derived_data_path: "~/Library/Developer/Xcode/DerivedData",
      buildlog_path: "./fastlane/fastlane-buildlog",
      scheme: "DevCycle",
      workspace: "DevCycle.xcworkspace",
      destination: "platform=macOS",
      result_bundle: true
    )
  end
end
