diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a89032c4..622ac97b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,11 @@ jobs: - uses: actions/checkout@v2 - name: bundle install run: bundle install -j$(nproc) --retry 3 + - name: install simplecov-fork only for minitest with coverage + run: | + gem install specific_install + gem specific_install https://github.com/exoego/simplecov.git branch-fix + if: matrix.coverage == 'coverage' - run: bundle exec rspec timeout-minutes: 1 - name: Upload coverage reports diff --git a/.simplecov_spawn.rb b/.simplecov_spawn.rb index 040e7669..0b5cd0c2 100644 --- a/.simplecov_spawn.rb +++ b/.simplecov_spawn.rb @@ -9,6 +9,7 @@ SimpleCov::Formatter::CoberturaFormatter, ]) SimpleCov.start do + enable_coverage :branch add_filter '/spec/' add_filter '/scripts/' end diff --git a/Gemfile b/Gemfile index 897b4735..edcdb401 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,7 @@ gem 'roda' gem 'rspec-rails' group :test do - gem 'simplecov' + gem 'simplecov', git: 'https://github.com/exoego/simplecov.git', branch: 'branch-fix' gem 'simplecov-cobertura' gem 'super_diff' end diff --git a/scripts/rspec_with_simplecov b/scripts/rspec_with_simplecov index b6fa6544..3ced42e9 100755 --- a/scripts/rspec_with_simplecov +++ b/scripts/rspec_with_simplecov @@ -36,8 +36,7 @@ begin require 'simplecov' SimpleCov.start do - # Flaky :( - # enable_coverage :branch + enable_coverage :branch end end rescue LoadError