diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5678c9..d4fc6c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,12 @@ jobs: gem install bundler --no-document bundle install --jobs 4 --retry 3 bundle exec rake + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + lint: runs-on: ubuntu-latest name: Rubocop lint diff --git a/Gemfile b/Gemfile index cc2712c..8354250 100644 --- a/Gemfile +++ b/Gemfile @@ -8,3 +8,5 @@ gemspec gem 'pry' gem 'rubocop' gem 'rubocop-performance' +gem 'simplecov' +gem 'simplecov-lcov' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index eb7db70..eba7185 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,6 +2,17 @@ require 'rspec' require 'webmock/rspec' +require 'simplecov' +require 'simplecov-lcov' + +SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true +SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter +SimpleCov::Formatter::LcovFormatter.config do |c| + c.output_directory = 'coverage' + c.lcov_file_name = 'lcov.info' + c.single_report_path = 'coverage/lcov.info' +end +SimpleCov.start require File.expand_path('../lib/sonarqube', __dir__)