Class: Fastlane::Actions::LcovAction

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

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, details, output, sh, step_text

Class Method Details

.authorObject



42
43
44
# File 'lib/fastlane/actions/lcov.rb', line 42

def self.author
  "thiagolioy"
end

.available_optionsObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/fastlane/actions/lcov.rb', line 20

def self.available_options
  [

    FastlaneCore::ConfigItem.new(key: :project_name,
                                 env_name: "FL_LCOV_PROJECT_NAME",
                                 description: "Name of the project"),

    FastlaneCore::ConfigItem.new(key: :scheme,
                                 env_name: "FL_LCOV_SCHEME",
                                 description: "Scheme of the project"),

    FastlaneCore::ConfigItem.new(key: :output_dir,
                                 env_name: "FL_LCOV_OUTPUT_DIR",
                                 description: "The output directory that coverage data will be stored. If not passed will use coverage_reports as default value",
                                 optional: true,
                                 is_string: true,
                                 default_value: "coverage_reports")


  ]
end

.descriptionObject



16
17
18
# File 'lib/fastlane/actions/lcov.rb', line 16

def self.description
  "Generates coverage data using lcov"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/fastlane/actions/lcov.rb', line 5

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

.run(options) ⇒ Object



9
10
11
12
13
14
# File 'lib/fastlane/actions/lcov.rb', line 9

def self.run(options)
  unless Helper.test?
    raise 'lcov not installed, please install using `brew install lcov`'.red if `which lcov`.length == 0
  end
  gen_cov(options)
end