Skip to content

Commit 05e88b6

Browse files
authored
Merge pull request #1090 from uclibs/#1086/coveralls
Switches to coverall-reborn and SimpleCov.
2 parents 70d83dd + e2b5282 commit 05e88b6

File tree

4 files changed

+43
-16
lines changed

4 files changed

+43
-16
lines changed

.circleci/config.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
version: 2.1
22
orbs:
33
samvera: samvera/circleci-orb@1
4+
coveralls: coveralls/[email protected]
5+
46
jobs:
57
build:
68
parameters:
@@ -81,9 +83,10 @@ jobs:
8183
- store_artifacts:
8284
path: coverage
8385

84-
- deploy:
85-
command: |
86-
curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_BUILD_NUM&payload[status]=done"
86+
- coveralls/upload:
87+
parallel_finished: true
88+
path_to_lcov: /home/circleci/ucrate/coverage/lcov/ucrate.lcov
89+
8790

8891
workflows:
8992
version: 2

Gemfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ end
107107
group :test do
108108
gem 'capybara', '~> 2.4', '< 2.18.0'
109109
gem 'capybara-maleficent', '~> 0.2'
110-
gem 'coveralls', '~> 0.8.22', require: false
110+
# gem 'coveralls', '~> 0.8.22', require: false
111+
gem 'coveralls_reborn'
111112
gem 'database_cleaner'
113+
gem 'simplecov-lcov', require: false
112114
# Keep factory_bot pinned, causes tests to fail if updated (10/2019)
113115
gem 'factory_bot_rails', '~> 4.11.1'
114116
gem 'rest-client'

Gemfile.lock

+14-12
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,11 @@ GEM
285285
coffee-script-source (1.12.2)
286286
concurrent-ruby (1.1.10)
287287
connection_pool (2.2.5)
288-
coveralls (0.8.23)
289-
json (>= 1.8, < 3)
290-
simplecov (~> 0.16.1)
291-
term-ansicolor (~> 1.3)
292-
thor (>= 0.19.4, < 2.0)
293-
tins (~> 1.6)
288+
coveralls_reborn (0.28.0)
289+
simplecov (~> 0.22.0)
290+
term-ansicolor (~> 1.7)
291+
thor (~> 1.2)
292+
tins (~> 1.32)
294293
crack (0.4.5)
295294
rexml
296295
crass (1.0.6)
@@ -1051,11 +1050,13 @@ GEM
10511050
simple_form (5.1.0)
10521051
actionpack (>= 5.2)
10531052
activemodel (>= 5.2)
1054-
simplecov (0.16.1)
1053+
simplecov (0.22.0)
10551054
docile (~> 1.1)
1056-
json (>= 1.8, < 3)
1057-
simplecov-html (~> 0.10.0)
1058-
simplecov-html (0.10.2)
1055+
simplecov-html (~> 0.11)
1056+
simplecov_json_formatter (~> 0.1)
1057+
simplecov-html (0.12.3)
1058+
simplecov-lcov (0.8.0)
1059+
simplecov_json_formatter (0.1.4)
10591060
slop (4.9.2)
10601061
snaky_hash (2.0.1)
10611062
hashie
@@ -1109,7 +1110,7 @@ GEM
11091110
thor (1.2.1)
11101111
thread_safe (0.3.6)
11111112
tilt (2.0.11)
1112-
tins (1.31.1)
1113+
tins (1.32.1)
11131114
sync
11141115
tinymce-rails (4.9.11)
11151116
railties (>= 3.1.1)
@@ -1189,7 +1190,7 @@ DEPENDENCIES
11891190
change_manager!
11901191
clamby
11911192
coffee-rails (~> 4.2)
1192-
coveralls (~> 0.8.22)
1193+
coveralls_reborn
11931194
database_cleaner
11941195
devise (~> 4.6.0)
11951196
devise-guests (~> 0.6)
@@ -1230,6 +1231,7 @@ DEPENDENCIES
12301231
show_me_the_cookies
12311232
sidekiq (~> 5.2.7)
12321233
sidekiq-limit_fetch
1234+
simplecov-lcov
12331235
solr_wrapper (>= 0.3)
12341236
sqlite3 (= 1.3.13)
12351237
turbolinks (~> 5)

spec/spec_helper.rb

+20
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,27 @@
1515
# it.
1616
#
1717
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18+
19+
require 'simplecov'
20+
require 'simplecov-lcov'
1821
require 'coveralls'
22+
23+
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
24+
SimpleCov.start 'rails'
25+
26+
SimpleCov.at_exit do
27+
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
28+
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
29+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
30+
[
31+
SimpleCov::Formatter::HTMLFormatter,
32+
SimpleCov::Formatter::LcovFormatter,
33+
Coveralls::SimpleCov::Formatter
34+
]
35+
)
36+
SimpleCov.result.format!
37+
end
38+
1939
Coveralls.wear!('rails')
2040

2141
RSpec.configure do |config|

0 commit comments

Comments
 (0)