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

Commit

Permalink
Update pass_ci_if_error flag (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu authored Mar 3, 2021
1 parent 9db6820 commit 98c283b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
- 2.6
- 2.7
- 3.0
- head
- jruby
- jruby-head
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
Expand Down
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### `0.5.1`
- #138 Update pass_ci_if_error flag

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

Expand Down
7 changes: 7 additions & 0 deletions lib/codecov/configuration.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

module Codecov
module Configuration
attr_accessor :pass_ci_if_error
end
end
5 changes: 4 additions & 1 deletion lib/codecov/uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def self.upload(report, disable_net_blockers = true)
rescue StandardError => e
puts `#{e.message}`
puts `#{e.backtrace.join("\n")}`
raise e unless ::SimpleCov.pass_ci_if_error
raise e unless ::Codecov.pass_ci_if_error

response = false
end
Expand Down Expand Up @@ -544,3 +544,6 @@ def self.green(str)
str.nil? ? '' : "\e[32m#{str}\e[0m"
end
end

require_relative 'configuration'
Codecov.extend Codecov::Configuration
2 changes: 1 addition & 1 deletion lib/codecov/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Codecov
VERSION = '0.5.0'
VERSION = '0.5.1'
end
1 change: 1 addition & 0 deletions test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
end
require_relative '../lib/codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov if ENV['CI'] == 'true'
Codecov.pass_ci_if_error = true

require 'minitest/autorun'
require 'mocha/minitest'
Expand Down

0 comments on commit 98c283b

Please sign in to comment.