Sha256: 65c537cc114e4290dadef88463f7e2c3835ec9583862ec6dd011dad5c52e3992

Contents?: true

Size: 1.49 KB

Versions: 39

Compression:

Stored size: 1.49 KB

Contents

module Fastlane
  module Actions
    class TrainerAction < Action
      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_results|
          UI.test_failure!("Unit tests failed") if fail_build && !test_results[:successful]
        end

        return resulting_paths
      end

      def self.description
        "Convert the Xcode plist log to a JUnit report"
      end

      def self.detail
        "Convert the Xcode plist log to a JUnit report. This will raise an exception if the tests failed"
      end

      def self.authors
        ["KrauseFx"]
      end

      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

      def self.available_options
        require 'trainer'
        FastlaneCore::CommanderGenerator.new.generate(Trainer::Options.available_options)
      end

      def self.is_supported?(platform)
        %i[ios mac].include?(platform)
      end

      def self.category
        :testing
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 4 rubygems

Version Path
fastlane-2.225.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.224.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.223.1 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.223.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.222.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.221.1 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.221.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.220.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.219.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.218.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-security-patched-2.216.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.217.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.216.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.215.1 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.215.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-mercafacil-2.214.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.214.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.213.0 fastlane/lib/fastlane/actions/trainer.rb
fastlane-2.212.2 fastlane/lib/fastlane/actions/trainer.rb
fastlane_pricing_fix-2.212.1 fastlane/lib/fastlane/actions/trainer.rb