Class: Fastlane::Actions::CodecovReporterAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::CodecovReporterAction
- Defined in:
- lib/fastlane/plugin/codecov_reporter/actions/codecov_reporter_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
29 30 31 |
# File 'lib/fastlane/plugin/codecov_reporter/actions/codecov_reporter_action.rb', line 29 def self. ["BinaryBeard"] end |
.available_options ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/fastlane/plugin/codecov_reporter/actions/codecov_reporter_action.rb', line 38 def self. [ FastlaneCore::ConfigItem.new(key: :token, env_name: "CODECOV_TOKEN", description: "Codecov.io private repo token", is_string: true, default_value: false) ] end |
.description ⇒ Object
25 26 27 |
# File 'lib/fastlane/plugin/codecov_reporter/actions/codecov_reporter_action.rb', line 25 def self.description "Uploads coverage report to Codecov.io" end |
.details ⇒ Object
33 34 35 36 |
# File 'lib/fastlane/plugin/codecov_reporter/actions/codecov_reporter_action.rb', line 33 def self.details # Optional: "Uploads coverage report, from a public or private repository, to Codecov.io" end |
.is_supported?(platform) ⇒ Boolean
48 49 50 |
# File 'lib/fastlane/plugin/codecov_reporter/actions/codecov_reporter_action.rb', line 48 def self.is_supported?(platform) true end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/fastlane/plugin/codecov_reporter/actions/codecov_reporter_action.rb', line 4 def self.run(params) UI. "I am Getting the latest bash script from Codecov.io" sh "curl -s -N https://Codecov.io/bash > #{ENV['PWD']}/codecov_reporter.sh" params[:token] ||= false if params[:token] != false UI. "It looks like I'm working with a private repository" sh "bash #{ENV['PWD']}/codecov_reporter.sh -K -t #{params[:token]}" else UI. "It looks like I'm working with a public repository" sh "bash #{ENV['PWD']}/codecov_reporter.sh -K " end UI. "Removing the bash script I got from Codecov.io" sh "rm #{ENV['PWD']}/codecov_reporter.sh" UI. "Removing the created coverage.txt files, if any." sh "rm -f *.coverage.txt" UI. "All was well" end |