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

Commit 98c283b

Browse files
authored
Update pass_ci_if_error flag (#138)
1 parent 9db6820 commit 98c283b

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

.github/workflows/ruby.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
- 2.6
1414
- 2.7
1515
- 3.0
16+
- head
17+
- jruby
18+
- jruby-head
1619
steps:
1720
- uses: actions/checkout@v2
1821
- name: Set up Ruby

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### `0.5.1`
2+
- #138 Update pass_ci_if_error flag
3+
14
### `0.5.0`
25
- #137 Place uploader in try/rescue block and add pass_ci_if_error flag
36

lib/codecov/configuration.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
module Codecov
4+
module Configuration
5+
attr_accessor :pass_ci_if_error
6+
end
7+
end

lib/codecov/uploader.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def self.upload(report, disable_net_blockers = true)
4343
rescue StandardError => e
4444
puts `#{e.message}`
4545
puts `#{e.backtrace.join("\n")}`
46-
raise e unless ::SimpleCov.pass_ci_if_error
46+
raise e unless ::Codecov.pass_ci_if_error
4747

4848
response = false
4949
end
@@ -544,3 +544,6 @@ def self.green(str)
544544
str.nil? ? '' : "\e[32m#{str}\e[0m"
545545
end
546546
end
547+
548+
require_relative 'configuration'
549+
Codecov.extend Codecov::Configuration

lib/codecov/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Codecov
4-
VERSION = '0.5.0'
4+
VERSION = '0.5.1'
55
end

test/helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
end
1010
require_relative '../lib/codecov'
1111
SimpleCov.formatter = SimpleCov::Formatter::Codecov if ENV['CI'] == 'true'
12+
Codecov.pass_ci_if_error = true
1213

1314
require 'minitest/autorun'
1415
require 'mocha/minitest'

0 commit comments

Comments
 (0)