Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Place uploader in try/rescue block and add pass_ci_if_error flag #137

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

thomasrockhu
Copy link
Contributor

@thomasrockhu thomasrockhu commented Feb 25, 2021

addresses #129

@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #137 (c1da113) into master (e0aa49e) will decrease coverage by 2.45%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #137      +/-   ##
==========================================
- Coverage   91.91%   89.46%   -2.46%     
==========================================
  Files           3        3              
  Lines         371      389      +18     
==========================================
+ Hits          341      348       +7     
- Misses         30       41      +11     
Impacted Files Coverage Δ
lib/codecov/uploader.rb 88.58% <33.33%> (-2.72%) ⬇️
lib/codecov/formatter.rb 92.59% <0.00%> (-1.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0aa49e...c1da113. Read the comment docs.

@thomasrockhu thomasrockhu requested a review from a team February 26, 2021 03:52
@thomasrockhu thomasrockhu merged commit 9db6820 into master Mar 1, 2021
@thomasrockhu thomasrockhu deleted the 0.5.0 branch March 1, 2021 20:56
rescue StandardError => e
puts `#{e.message}`
puts `#{e.backtrace.join("\n")}`
raise e unless ::SimpleCov.pass_ci_if_error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this actually be Codecov.pass_ci_if_error? (And implement the attribute)

$ rails c
Loading development environment (Rails 6.0.3.5)
irb: warn: can't alias context from irb_context.
2.7.2 :001 >   require 'simplecov'
 => true 
2.7.2 :002 >   SimpleCov.start
 => nil 
2.7.2 :003 > 
2.7.2 :004 >   require 'codecov'
 => true 
2.7.2 :005 >   SimpleCov.formatter = SimpleCov::Formatter::Codecov
 => SimpleCov::Formatter::Codecov 
2.7.2 :006 >   SimpleCov.pass_ci_if_error = true
Traceback (most recent call last):
        1: from (irb):6
NoMethodError (undefined method `pass_ci_if_error=' for SimpleCov:Module)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is clearly my fault. I'll be looking to release 0.5.1 with this PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants