Skip to content

Commit 0900d28

Browse files
ghassanmasfeanil
authored andcommitted
test: update codecov workflow
1 parent bb9ee8f commit 0900d28

File tree

6 files changed

+21
-12
lines changed

6 files changed

+21
-12
lines changed

.github/workflows/ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,9 @@ jobs:
6969
- name: Run tests
7070
run: bin/rspec -fd
7171
continue-on-error: ${{ matrix.allow-failure }}
72+
- name: Send test coverage report to codecov.io
73+
uses: codecov/codecov-action@v4
74+
with:
75+
lags: unittests
76+
fail_ci_if_error: true
77+
token: ${{ secrets.CODECOV_TOKEN }}

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ gem 'dalli'
4545
gem 'rest-client'
4646

4747
group :test do
48-
gem 'codecov', :require => false
48+
gem 'simplecov-cobertura', :require => false
4949
gem 'mongoid_cleaner', '~> 1.2.0'
5050
gem 'factory_bot'
5151
gem 'faker'

Gemfile.lock

+5-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ GEM
2929
bigdecimal (3.1.6)
3030
bson (4.15.0)
3131
bson_ext (1.5.1)
32-
codecov (0.6.0)
33-
simplecov (>= 0.15, < 0.22)
3432
coderay (1.1.3)
3533
concurrent-ruby (1.2.3)
3634
crack (1.0.0)
@@ -201,10 +199,13 @@ GEM
201199
rspec-support (3.13.0)
202200
ruby2_keywords (0.0.5)
203201
shellany (0.0.1)
204-
simplecov (0.21.2)
202+
simplecov (0.22.0)
205203
docile (~> 1.1)
206204
simplecov-html (~> 0.11)
207205
simplecov_json_formatter (~> 0.1)
206+
simplecov-cobertura (2.1.0)
207+
rexml
208+
simplecov (~> 0.19)
208209
simplecov-html (0.12.3)
209210
simplecov_json_formatter (0.1.4)
210211
sinatra (4.0.0)
@@ -241,7 +242,6 @@ DEPENDENCIES
241242
bson
242243
bson_ext
243244
bundler
244-
codecov
245245
dalli
246246
ddtrace
247247
delayed_job
@@ -272,6 +272,7 @@ DEPENDENCIES
272272
rspec
273273
rspec-collection_matchers
274274
rspec-its
275+
simplecov-cobertura
275276
sinatra
276277
sinatra-param (~> 1.4)
277278
timecop (~> 0.9.5)

Gemfile3

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ gem 'dalli'
4646
gem 'rest-client'
4747

4848
group :test do
49-
gem 'codecov', :require => false
49+
gem 'simplecov-cobertura', :require => false
5050
gem 'mongoid_cleaner', '~> 1.2.0'
5151
gem 'factory_bot'
5252
gem 'faker'

Gemfile3.lock

+6-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ GEM
2929
bigdecimal (3.1.6)
3030
bson (4.15.0)
3131
bson_ext (1.5.1)
32-
codecov (0.6.0)
33-
simplecov (>= 0.15, < 0.22)
3432
coderay (1.1.3)
3533
concurrent-ruby (1.2.3)
3634
crack (1.0.0)
@@ -210,10 +208,13 @@ GEM
210208
rspec-support (3.13.0)
211209
ruby2_keywords (0.0.5)
212210
shellany (0.0.1)
213-
simplecov (0.21.2)
211+
simplecov (0.22.0)
214212
docile (~> 1.1)
215213
simplecov-html (~> 0.11)
216214
simplecov_json_formatter (~> 0.1)
215+
simplecov-cobertura (2.1.0)
216+
rexml
217+
simplecov (~> 0.19)
217218
simplecov-html (0.12.3)
218219
simplecov_json_formatter (0.1.4)
219220
sinatra (4.0.0)
@@ -245,14 +246,14 @@ GEM
245246
PLATFORMS
246247
aarch64-linux
247248
arm64-darwin-22
249+
arm64-darwin-23
248250
x86_64-linux
249251

250252
DEPENDENCIES
251253
activemodel
252254
bson
253255
bson_ext
254256
bundler
255-
codecov
256257
dalli
257258
ddtrace
258259
delayed_job
@@ -284,6 +285,7 @@ DEPENDENCIES
284285
rspec
285286
rspec-collection_matchers
286287
rspec-its
288+
simplecov-cobertura
287289
sinatra
288290
sinatra-param (~> 1.4)
289291
timecop (~> 0.9.5)

spec/spec_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
require 'simplecov'
44
SimpleCov.start
55
if ENV['CI']=='true'
6-
require 'codecov'
7-
SimpleCov.formatter = SimpleCov::Formatter::Codecov
6+
require 'simplecov-cobertura'
7+
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
88
end
99

1010
require File.join(File.dirname(__FILE__), '..', 'app')

0 commit comments

Comments
 (0)