Class: Publisher::Commands::Upload

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
Helpers
Defined in:
lib/allure_report_publisher/commands/upload.rb

Overview

Upload allure report

Instance Method Summary collapse

Methods included from Helpers

allure_cli?, colorize, debug_io, #env, error, execute_shell, log, log_debug, logger, pastel, path, reset_debug_io!

Instance Method Details

#call(**args) ⇒ Object



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/allure_report_publisher/commands/upload.rb', line 89

def call(**args)
  Helpers.pastel(force_color: args[:color])
  @args = args

  validate_args
  scan_results_paths

  generate_report
  upload_report
  return unless args[:update_pr] && Providers.info&.pr?

  add_report_urls
rescue StandardError => e
  handle_error(e)
end