Class: Fastlane::Actions::TrainerAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::TrainerAction
- Defined in:
- lib/fastlane/plugin/trainer/actions/trainer_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
23 24 25 |
# File 'lib/fastlane/plugin/trainer/actions/trainer_action.rb', line 23 def self. ["KrauseFx"] end |
.available_options ⇒ Object
31 32 33 34 |
# File 'lib/fastlane/plugin/trainer/actions/trainer_action.rb', line 31 def self. require "trainer/options" FastlaneCore::CommanderGenerator.new.generate(::Trainer::Options.) end |
.description ⇒ Object
19 20 21 |
# File 'lib/fastlane/plugin/trainer/actions/trainer_action.rb', line 19 def self.description "Convert the Xcode plist log to a JUnit report. This will raise an exception if the tests failed" end |
.is_supported?(platform) ⇒ Boolean
36 37 38 |
# File 'lib/fastlane/plugin/trainer/actions/trainer_action.rb', line 36 def self.is_supported?(platform) [:ios, :mac].include?(platform) end |
.return_value ⇒ Object
27 28 29 |
# File 'lib/fastlane/plugin/trainer/actions/trainer_action.rb', line 27 def self.return_value "A hash with the key being the path of the generated file, the value being if the tests were successful" end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fastlane/plugin/trainer/actions/trainer_action.rb', line 4 def self.run(params) require "trainer" params[:path] = Actions.lane_context[Actions::SharedValues::SCAN_GENERATED_PLIST_FILE] if Actions.lane_context[Actions::SharedValues::SCAN_GENERATED_PLIST_FILE] params[:path] ||= Actions.lane_context[Actions::SharedValues::SCAN_DERIVED_DATA_PATH] if Actions.lane_context[Actions::SharedValues::SCAN_DERIVED_DATA_PATH] fail_build = params[:fail_build] resulting_paths = ::Trainer::TestParser.auto_convert(params) resulting_paths.each do |path, test_successful| UI.test_failure!("Unit tests failed") if fail_build && !test_successful end return resulting_paths end |