Class: Fastlane::Actions::XctoolAction

Inherits:
Fastlane::Action show all
Defined in:
fastlane/lib/fastlane/actions/xctool.rb

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, available_options, deprecated_notes, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text

Class Method Details

.authorObject



27
28
29
# File 'fastlane/lib/fastlane/actions/xctool.rb', line 27

def self.author
  "KrauseFx"
end

.categoryObject



50
51
52
# File 'fastlane/lib/fastlane/actions/xctool.rb', line 50

def self.category
  :testing
end

.descriptionObject



15
16
17
# File 'fastlane/lib/fastlane/actions/xctool.rb', line 15

def self.description
  "Run tests using xctool"
end

.detailsObject



19
20
21
22
23
24
25
# File 'fastlane/lib/fastlane/actions/xctool.rb', line 19

def self.details
  [
    "You can run any `xctool` action. This will require having [xctool](https://github.com/facebook/xctool) installed through [Homebrew](http://brew.sh).",
    "It is recommended to store the build configuration in the `.xctool-args` file.",
    "More information: [https://docs.fastlane.tools/actions/xctool/](https://docs.fastlane.tools/actions/xctool/)."
  ].join("\n")
end

.example_codeObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'fastlane/lib/fastlane/actions/xctool.rb', line 35

def self.example_code
  [
    'xctool(:test)',

    '# If you prefer to have the build configuration stored in the `Fastfile`:
    xctool(:test, [
      "--workspace", "\'AwesomeApp.xcworkspace\'",
      "--scheme", "\'Schema Name\'",
      "--configuration", "Debug",
      "--sdk", "iphonesimulator",
      "--arch", "i386"
    ].join(" "))'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



31
32
33
# File 'fastlane/lib/fastlane/actions/xctool.rb', line 31

def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'fastlane/lib/fastlane/actions/xctool.rb', line 4

def self.run(params)
  UI.important("Have you seen the new 'scan' tool to run tests? https://docs.fastlane.tools/actions/scan/")
  unless Helper.test?
    UI.user_error!("xctool not installed, please install using `brew install xctool`") if `which xctool`.length == 0
  end

  params = [] if params.kind_of?(FastlaneCore::Configuration)

  Actions.sh('xctool ' + params.join(' '))
end