From 4d7cf719affedf529641e79eac3fb995c6eb3371 Mon Sep 17 00:00:00 2001 From: Yuji Nakayama Date: Tue, 27 Oct 2020 12:05:02 +0900 Subject: [PATCH] Update Coveralls handling for GitHub actions --- .github/workflows/ci.yml | 3 +++ Gemfile | 2 +- spec/support/simplecov.rb | 10 ++++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d51ba54..ab9a23a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,9 @@ jobs: ruby-version: ${{ matrix.ruby }} - run: bundle install - run: bundle exec rspec + - uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} rubocop: name: RuboCop runs-on: ubuntu-latest diff --git a/Gemfile b/Gemfile index d0d94a9..84c57fa 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ source 'https://rubygems.org' gemspec group :test do - gem 'coveralls', '~> 0.6' + gem 'simplecov-lcov' end diff --git a/spec/support/simplecov.rb b/spec/support/simplecov.rb index c0cdff4..5b29d27 100644 --- a/spec/support/simplecov.rb +++ b/spec/support/simplecov.rb @@ -3,8 +3,14 @@ require 'simplecov' if ENV['CI'] - require 'coveralls' - SimpleCov.formatter = Coveralls::SimpleCov::Formatter + require 'simplecov-lcov' + + SimpleCov::Formatter::LcovFormatter.config do |config| + config.report_with_single_file = true + config.single_report_path = 'coverage/lcov.info' + end + + SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter end SimpleCov.start do