diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8b6b77c..d2f0943e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,6 +107,13 @@ jobs: env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile + - name: Report to Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.github_token }} + flag-name: test-${{ matrix.ruby }}-${{ matrix.gemfile }} + parallel: true + finish: needs: test @@ -114,7 +121,7 @@ jobs: steps: - name: Report completion to Coveralls - uses: coverallsapp/github-action@v1 + uses: coverallsapp/github-action@v1.1.2 with: github-token: ${{ secrets.github_token }} parallel-finished: true diff --git a/gemfiles/pry010.gemfile b/gemfiles/pry010.gemfile index 4503b67c..1daca580 100644 --- a/gemfiles/pry010.gemfile +++ b/gemfiles/pry010.gemfile @@ -4,6 +4,7 @@ gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0' gem "binding_of_caller" gem "pry", "~> 0.10.0" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/pry011.gemfile b/gemfiles/pry011.gemfile index 761c5918..206b89d7 100644 --- a/gemfiles/pry011.gemfile +++ b/gemfiles/pry011.gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0' gem "pry", "~> 0.11.0pre" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/pry09.gemfile b/gemfiles/pry09.gemfile index db7fa6bc..130326b9 100644 --- a/gemfiles/pry09.gemfile +++ b/gemfiles/pry09.gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0' gem "pry", "~> 0.9.12" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rack.gemfile b/gemfiles/rack.gemfile index 4f2bab73..b5bbff7a 100644 --- a/gemfiles/rack.gemfile +++ b/gemfiles/rack.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0' -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rack_boc.gemfile b/gemfiles/rack_boc.gemfile index 0899c028..09520d9b 100644 --- a/gemfiles/rack_boc.gemfile +++ b/gemfiles/rack_boc.gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" gem 'rack', RUBY_VERSION < '2.2.2' ? '~> 1.6' : '~> 2.0' gem "binding_of_caller" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails42.gemfile b/gemfiles/rails42.gemfile index ba2e191f..caaeb8ef 100644 --- a/gemfiles/rails42.gemfile +++ b/gemfiles/rails42.gemfile @@ -4,6 +4,7 @@ gem "rails", "~> 4.2.0" gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7' gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails42_boc.gemfile b/gemfiles/rails42_boc.gemfile index 2e66ac54..c3619a6a 100644 --- a/gemfiles/rails42_boc.gemfile +++ b/gemfiles/rails42_boc.gemfile @@ -5,6 +5,7 @@ gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7' gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' gem "binding_of_caller" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails42_haml.gemfile b/gemfiles/rails42_haml.gemfile index a22370a6..6f656aae 100644 --- a/gemfiles/rails42_haml.gemfile +++ b/gemfiles/rails42_haml.gemfile @@ -5,6 +5,7 @@ gem 'nokogiri', RUBY_VERSION < '2.1' ? '~> 1.6.0' : '>= 1.7' gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' gem "haml" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails50.gemfile b/gemfiles/rails50.gemfile index 7d31f08d..856109f5 100644 --- a/gemfiles/rails50.gemfile +++ b/gemfiles/rails50.gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" gem "rails", "~> 5.0.0" gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails50_boc.gemfile b/gemfiles/rails50_boc.gemfile index a7955aad..6632ab09 100644 --- a/gemfiles/rails50_boc.gemfile +++ b/gemfiles/rails50_boc.gemfile @@ -4,6 +4,7 @@ gem "rails", "~> 5.0.0" gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' gem "binding_of_caller" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails50_haml.gemfile b/gemfiles/rails50_haml.gemfile index 5ad597ec..c549086b 100644 --- a/gemfiles/rails50_haml.gemfile +++ b/gemfiles/rails50_haml.gemfile @@ -4,6 +4,7 @@ gem "rails", "~> 5.0.0" gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' gem "haml" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails51.gemfile b/gemfiles/rails51.gemfile index 5532febb..6b80d819 100644 --- a/gemfiles/rails51.gemfile +++ b/gemfiles/rails51.gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" gem "rails", "~> 5.1.0" gem 'i18n', '< 1.5.2', require: false if RUBY_VERSION < '2.3' -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails51_boc.gemfile b/gemfiles/rails51_boc.gemfile index bfb2cc92..391459d4 100644 --- a/gemfiles/rails51_boc.gemfile +++ b/gemfiles/rails51_boc.gemfile @@ -4,6 +4,7 @@ gem "rails", "~> 5.1.0" gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' gem "binding_of_caller" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails51_haml.gemfile b/gemfiles/rails51_haml.gemfile index a870a7cf..4be7c4bc 100644 --- a/gemfiles/rails51_haml.gemfile +++ b/gemfiles/rails51_haml.gemfile @@ -4,6 +4,7 @@ gem "rails", "~> 5.1.0" gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' gem "haml" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails52.gemfile b/gemfiles/rails52.gemfile index 070970cd..887de07d 100644 --- a/gemfiles/rails52.gemfile +++ b/gemfiles/rails52.gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" gem "rails", "~> 5.2.0" gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails52_boc.gemfile b/gemfiles/rails52_boc.gemfile index 195e4e23..669c73fd 100644 --- a/gemfiles/rails52_boc.gemfile +++ b/gemfiles/rails52_boc.gemfile @@ -4,6 +4,7 @@ gem "rails", "~> 5.2.0" gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' gem "binding_of_caller" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails52_haml.gemfile b/gemfiles/rails52_haml.gemfile index dd9f0dc9..c2bb1f57 100644 --- a/gemfiles/rails52_haml.gemfile +++ b/gemfiles/rails52_haml.gemfile @@ -4,6 +4,7 @@ gem "rails", "~> 5.2.0" gem 'i18n', '< 1.5.2' if RUBY_VERSION < '2.3' gem "haml" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails60.gemfile b/gemfiles/rails60.gemfile index 55f89c5e..825f46ca 100644 --- a/gemfiles/rails60.gemfile +++ b/gemfiles/rails60.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" gem "rails", "~> 6.0.0" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails60_boc.gemfile b/gemfiles/rails60_boc.gemfile index 190c573c..c32cb5d9 100644 --- a/gemfiles/rails60_boc.gemfile +++ b/gemfiles/rails60_boc.gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" gem "rails", "~> 6.0.0" gem "binding_of_caller" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/gemfiles/rails60_haml.gemfile b/gemfiles/rails60_haml.gemfile index 84d3401a..e4f3179c 100644 --- a/gemfiles/rails60_haml.gemfile +++ b/gemfiles/rails60_haml.gemfile @@ -3,6 +3,7 @@ source "https://rubygems.org" gem "rails", "~> 6.0.0" gem "haml" -gem 'coveralls', require: false +gem 'simplecov', require: false +gem 'simplecov-lcov', require: false gemspec path: "../" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 29e5ac18..45fde6a2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,19 +2,23 @@ ENV["EDITOR"] = nil -# Ruby 2.4.0 and 2.4.1 has a bug with its Coverage module that causes segfaults. -# https://bugs.ruby-lang.org/issues/13305 -# 2.4.2 should include this patch. if ENV['CI'] - unless RUBY_VERSION == '2.4.0' || RUBY_VERSION == '2.4.1' - require 'coveralls' - Coveralls.wear! do - add_filter 'spec/' - end - end -else require 'simplecov' - SimpleCov.start + require 'simplecov-lcov' + + SimpleCov::Formatter::LcovFormatter.config do |c| + c.report_with_single_file = true + c.single_report_path = 'coverage/lcov.info' + end + SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new( + [ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::LcovFormatter, + ] + ) + SimpleCov.start do + add_filter 'spec/' + end end require 'bundler/setup'