diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07461bd..ac0655d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,32 +8,25 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-13] - ruby: [2.6, head, jruby, jruby-head] + os: [ubuntu-latest, macos-latest] + ruby: [2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, head, jruby, jruby-head] continue-on-error: ${{ endsWith(matrix.ruby, 'head') || endsWith(matrix.ruby, 'jruby') }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - # HACK: Continue to use bundler <2 because of Ruby v2.2 support. Once the - # lowest dependency is Ruby v2.3 we can consider upgrading to Bundler 2.x. - bundler: 2.1 bundler-cache: true - run: bundle exec rake spec coverage: needs: [ test ] name: coverage - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 - # HACK: Continue to use bundler <2 because of Ruby v2.2 support. Once the - # lowest dependency is Ruby v2.3 we can consider upgrading to Bundler 2.x. - bundler: 2.1 bundler-cache: true - run: bundle exec rake env: diff --git a/rspec-side_effects.gemspec b/rspec-side_effects.gemspec index f02ff5a..277f37d 100644 --- a/rspec-side_effects.gemspec +++ b/rspec-side_effects.gemspec @@ -40,6 +40,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 0.68.0' spec.add_development_dependency 'rubocop-rspec' spec.add_development_dependency 'simplecov' + spec.add_development_dependency 'simplecov-lcov' spec.add_development_dependency 'yard' spec.add_development_dependency 'yardstick' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 19125da..538fb60 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,7 +4,21 @@ # Setup code coverage require 'simplecov' -SimpleCov.start +require 'simplecov-lcov' +require 'simplecov_json_formatter' +SimpleCov.start do + # NOTE: Include the lcov formatter for CodeClimate reporting. + # Even though the simplecov JSON format will be output and used by default, + # the test reporter does not handle it reliable. + # Using the lcov formatter is more reliable. + SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new( + [ + SimpleCov::Formatter::HTMLFormatter, + SimpleCov::Formatter::JSONFormatter, + SimpleCov::Formatter::LcovFormatter + ] + ) +end require 'rspec/side_effects'