Skip to content

Commit

Permalink
Fix coveralls integration (#223)
Browse files Browse the repository at this point in the history
Switch from the deprecated coveralls gem to the Coveralls GitHub
Action.

The coveralls gem fails with SSLError [1] because it sets ssl_version
to TLSv1, and its API endpoint is gone (404 Not Found). There is a
community-maintained replacement called coveralls-ruby-reborn, but the
official integration is through the Coveralls GitHub Action which is
easy enough to use so we just switch to that.

[1] https://www.github.com/lemurheavy/coveralls-ruby/issues/163

Co-authored-by: Tom Levy <[email protected]>
  • Loading branch information
Holmes98 and tom93 committed Jan 1, 2024
1 parent 5a5b6e6 commit 025e64c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ jobs:

- run: bundle exec rake db:test:load
- run: bundle exec rspec

- uses: coverallsapp/github-action@v2
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
/db/backup/
/db/backups/
/.fontello
/coverage/.*
/coverage/
/vendor/bundle

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ gem 'sinatra'

# Monitoring
gem 'newrelic_rpm'
gem 'coveralls', require: false
gem 'simplecov', require: false
gem 'sentry-raven'

group :development do
Expand Down
22 changes: 6 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ GEM
country_select (3.1.1)
countries (~> 2.0)
sort_alphabetical (~> 1.0)
coveralls (0.8.21)
json (>= 1.8, < 3)
simplecov (~> 0.14.1)
term-ansicolor (~> 1.3)
thor (~> 0.19.4)
tins (~> 1.6)
crass (1.0.5)
daemons (1.4.1)
debug_inspector (0.0.3)
Expand All @@ -123,7 +117,7 @@ GEM
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.5.0)
docile (1.1.5)
docile (1.3.5)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
erubi (1.12.0)
Expand Down Expand Up @@ -365,11 +359,10 @@ GEM
simple_form (3.2.1)
actionpack (> 4, < 5.1)
activemodel (> 4, < 5.1)
simplecov (0.14.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
simplecov (0.18.5)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.3)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
Expand Down Expand Up @@ -403,16 +396,13 @@ GEM
request_store (~> 1.0.3)
strong_attributes (~> 0.0.2)
superfish-rails (1.6.0.1)
term-ansicolor (1.6.0)
tins (~> 1.0)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.8)
tins (1.16.3)
ttfunk (1.5.1)
tzinfo (1.2.11)
thread_safe (~> 0.1)
Expand Down Expand Up @@ -454,7 +444,6 @@ DEPENDENCIES
connection_pool
countries
country_select
coveralls
devise (~> 3.4.1)
facebox-rails
factory_bot_rails
Expand Down Expand Up @@ -495,6 +484,7 @@ DEPENDENCIES
sentry-raven
simple-navigation (= 3.11.0)
simple_form (= 3.2.1)
simplecov
sinatra
spring
squeel
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'coveralls'
Coveralls.wear!('rails')
require 'simplecov'
SimpleCov.start 'rails'

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
Expand Down

0 comments on commit 025e64c

Please sign in to comment.