Skip to content

Commit 4cbcf97

Browse files
authored
chore: add codecov integration (#59)
Signed-off-by: Manuel Schönlaub <[email protected]>
1 parent 914e943 commit 4cbcf97

File tree

5 files changed

+50
-14
lines changed

5 files changed

+50
-14
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
- run: bundle install
3333
- name: RSpec
3434
run: bundle exec rspec
35+
- name: Upload coverage to Codecov
36+
uses: codecov/codecov-action@398b9de041a7e69750d45077b10c5912201a3466
37+
with:
38+
fail_ci_if_error: true
39+
verbose: true
40+
file: coverage/coverage.xml
3541
rubocop:
3642
name: Rubocop
3743
runs-on: ubuntu-latest

.simplecov

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
require "simplecov-cobertura"
4+
5+
SimpleCov.start do
6+
add_filter "/spec/"
7+
if ENV["CI"] == "true"
8+
formatter SimpleCov::Formatter::CoberturaFormatter
9+
else
10+
formatter SimpleCov::Formatter::HTMLFormatter
11+
end
12+
end

Gemfile.lock

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,31 @@ GEM
99
ast (2.4.2)
1010
concurrent-ruby (1.2.2)
1111
diff-lcs (1.5.0)
12-
json (2.6.2)
13-
markly (0.7.0)
14-
parallel (1.22.1)
15-
parser (3.1.2.1)
12+
docile (1.4.0)
13+
json (2.6.3)
14+
markly (0.10.0)
15+
parallel (1.23.0)
16+
parser (3.2.2.3)
1617
ast (~> 2.4.1)
18+
racc
19+
racc (1.7.1)
1720
rainbow (3.1.1)
1821
rake (13.0.6)
19-
regexp_parser (2.6.0)
20-
rexml (3.2.5)
22+
regexp_parser (2.8.1)
23+
rexml (3.2.6)
2124
rspec (3.12.0)
2225
rspec-core (~> 3.12.0)
2326
rspec-expectations (~> 3.12.0)
2427
rspec-mocks (~> 3.12.0)
25-
rspec-core (3.12.0)
28+
rspec-core (3.12.2)
2629
rspec-support (~> 3.12.0)
27-
rspec-expectations (3.12.0)
30+
rspec-expectations (3.12.3)
2831
diff-lcs (>= 1.2.0, < 2.0)
2932
rspec-support (~> 3.12.0)
30-
rspec-mocks (3.12.0)
33+
rspec-mocks (3.12.6)
3134
diff-lcs (>= 1.2.0, < 2.0)
3235
rspec-support (~> 3.12.0)
33-
rspec-support (3.12.0)
36+
rspec-support (3.12.1)
3437
rubocop (1.37.1)
3538
json (~> 2.3)
3639
parallel (~> 1.10)
@@ -41,10 +44,19 @@ GEM
4144
rubocop-ast (>= 1.23.0, < 2.0)
4245
ruby-progressbar (~> 1.7)
4346
unicode-display_width (>= 1.4.0, < 3.0)
44-
rubocop-ast (1.23.0)
45-
parser (>= 3.1.1.0)
46-
ruby-progressbar (1.11.0)
47-
unicode-display_width (2.3.0)
47+
rubocop-ast (1.29.0)
48+
parser (>= 3.2.1.0)
49+
ruby-progressbar (1.13.0)
50+
simplecov (0.22.0)
51+
docile (~> 1.1)
52+
simplecov-html (~> 0.11)
53+
simplecov_json_formatter (~> 0.1)
54+
simplecov-cobertura (2.1.0)
55+
rexml
56+
simplecov (~> 0.19)
57+
simplecov-html (0.12.3)
58+
simplecov_json_formatter (0.1.4)
59+
unicode-display_width (2.4.2)
4860

4961
PLATFORMS
5062
arm64-darwin-21
@@ -63,6 +75,8 @@ DEPENDENCIES
6375
rake (~> 13.0)
6476
rspec (~> 3.12.0)
6577
rubocop (~> 1.37.1)
78+
simplecov (~> 0.22.0)
79+
simplecov-cobertura (~> 2.1.0)
6680

6781
BUNDLED WITH
6882
2.3.25

openfeature-sdk.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ Gem::Specification.new do |spec|
3535
spec.add_development_dependency "rake", "~> 13.0"
3636
spec.add_development_dependency "rspec", "~> 3.12.0"
3737
spec.add_development_dependency "rubocop", "~> 1.37.1"
38+
spec.add_development_dependency "simplecov", "~> 0.22.0"
39+
spec.add_development_dependency "simplecov-cobertura", "~> 2.1.0"
3840
end

spec/spec_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require "simplecov"
4+
35
require "openfeature/sdk"
46

57
require "markly"

0 commit comments

Comments
 (0)