Skip to content

Commit

Permalink
Merge pull request #1090 from uclibs/#1086/coveralls
Browse files Browse the repository at this point in the history
Switches to coverall-reborn and SimpleCov.
  • Loading branch information
crowesn authored Nov 2, 2023
2 parents 70d83dd + e2b5282 commit 05e88b6
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 16 deletions.
9 changes: 6 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
version: 2.1
orbs:
samvera: samvera/circleci-orb@1
coveralls: coveralls/[email protected]

jobs:
build:
parameters:
Expand Down Expand Up @@ -81,9 +83,10 @@ jobs:
- store_artifacts:
path: coverage

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


workflows:
version: 2
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ end
group :test do
gem 'capybara', '~> 2.4', '< 2.18.0'
gem 'capybara-maleficent', '~> 0.2'
gem 'coveralls', '~> 0.8.22', require: false
# gem 'coveralls', '~> 0.8.22', require: false
gem 'coveralls_reborn'
gem 'database_cleaner'
gem 'simplecov-lcov', require: false
# Keep factory_bot pinned, causes tests to fail if updated (10/2019)
gem 'factory_bot_rails', '~> 4.11.1'
gem 'rest-client'
Expand Down
26 changes: 14 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,11 @@ GEM
coffee-script-source (1.12.2)
concurrent-ruby (1.1.10)
connection_pool (2.2.5)
coveralls (0.8.23)
json (>= 1.8, < 3)
simplecov (~> 0.16.1)
term-ansicolor (~> 1.3)
thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
coveralls_reborn (0.28.0)
simplecov (~> 0.22.0)
term-ansicolor (~> 1.7)
thor (~> 1.2)
tins (~> 1.32)
crack (0.4.5)
rexml
crass (1.0.6)
Expand Down Expand Up @@ -1051,11 +1050,13 @@ GEM
simple_form (5.1.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
simplecov (0.16.1)
simplecov (0.22.0)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
slop (4.9.2)
snaky_hash (2.0.1)
hashie
Expand Down Expand Up @@ -1109,7 +1110,7 @@ GEM
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.0.11)
tins (1.31.1)
tins (1.32.1)
sync
tinymce-rails (4.9.11)
railties (>= 3.1.1)
Expand Down Expand Up @@ -1189,7 +1190,7 @@ DEPENDENCIES
change_manager!
clamby
coffee-rails (~> 4.2)
coveralls (~> 0.8.22)
coveralls_reborn
database_cleaner
devise (~> 4.6.0)
devise-guests (~> 0.6)
Expand Down Expand Up @@ -1230,6 +1231,7 @@ DEPENDENCIES
show_me_the_cookies
sidekiq (~> 5.2.7)
sidekiq-limit_fetch
simplecov-lcov
solr_wrapper (>= 0.3)
sqlite3 (= 1.3.13)
turbolinks (~> 5)
Expand Down
20 changes: 20 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,27 @@
# it.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration

require 'simplecov'
require 'simplecov-lcov'
require 'coveralls'

SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov.start 'rails'

SimpleCov.at_exit do
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
[
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::LcovFormatter,
Coveralls::SimpleCov::Formatter
]
)
SimpleCov.result.format!
end

Coveralls.wear!('rails')

RSpec.configure do |config|
Expand Down

0 comments on commit 05e88b6

Please sign in to comment.