Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleanup coveralls/simplecov setup #1123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/jruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,21 @@ jobs:
- name: Run tests
env:
JRUBY_OPTS: --debug
COVERAGE: true
run: bundle exec rake
- name: Coveralls GitHub Action
if: matrix.os == 'ubuntu'
uses: coverallsapp/github-action@v2
with:
parallel: true
github-token: ${{ secrets.github_token }}
path-to-lcov: './coverage/lcov/omniauth.lcov'
flag-name: ${{ matrix.jruby }}
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v1
with:
parallel-finished: true
30 changes: 16 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ jobs:
bundler-cache: true
- name: Run tests
run: bundle exec rake
env:
COVERAGE: true
- name: Coveralls GitHub Action
if: matrix.os == 'ubuntu'
uses: coverallsapp/github-action@v2
with:
parallel: true
github-token: ${{ secrets.github_token }}
path-to-lcov: './coverage/lcov/omniauth.lcov'
flag-name: ${{ matrix.ruby }}
frozen-string-compat:
runs-on: ubuntu-latest
steps:
Expand All @@ -43,19 +53,11 @@ jobs:
env:
RUBYOPT: "--enable-frozen-string-literal"
run: bundle exec rake
coveralls:
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Run tests
run: bundle exec rake
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: './coverage/lcov/omniauth.lcov'
- name: Close parallel build
uses: coverallsapp/github-action@v1
with:
parallel-finished: true
18 changes: 18 additions & 0 deletions .github/workflows/truffle_ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,21 @@ jobs:
bundler-cache: true
- name: Run tests
run: bundle exec rake
env:
COVERAGE: true
- name: Coveralls GitHub Action
if: matrix.os == 'ubuntu'
uses: coverallsapp/github-action@v2
with:
parallel: true
github-token: ${{ secrets.github_token }}
path-to-lcov: './coverage/lcov/omniauth.lcov'
flag-name: ${{ matrix.ruby }}
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v1
with:
parallel-finished: true
18 changes: 18 additions & 0 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'simplecov-lcov'

SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
c.single_report_path = 'coverage/lcov/omniauth.lcov'
end
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
[
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::LcovFormatter,
]
)

SimpleCov.start do
add_filter ['/spec/', '/vendor/', 'strategy_macros.rb']
minimum_coverage(92.5)
maximum_coverage_drop(0.05)
end
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ group :development do
end

group :test do
gem 'coveralls_reborn', '~> 0.19.0', require: false
gem 'rack-test'
gem 'rspec', '~> 3.5'
gem 'rack-freeze'
gem 'rubocop', '>= 0.58.2', '< 0.69.0', platforms: %i[ruby_22 ruby_23 ruby_24]
gem 'simplecov-lcov'
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false
end

gemspec
18 changes: 2 additions & 16 deletions spec/helper.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
require 'simplecov'
require 'coveralls'
require 'simplecov-lcov'

SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true

SimpleCov.formatters = [
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::LcovFormatter,
Coveralls::SimpleCov::Formatter
]

SimpleCov.start do
add_filter ['/spec/', '/vendor/', 'strategy_macros.rb']
minimum_coverage(92.5)
maximum_coverage_drop(0.05)
if ENV['COVERAGE'] == 'true'
require 'simplecov'
end

require 'rspec'
Expand Down