Skip to content

Commit

Permalink
Update Coveralls handling for GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinakayama committed Oct 27, 2020
1 parent bc5769c commit 4d7cf71
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ source 'https://rubygems.org'
gemspec

group :test do
gem 'coveralls', '~> 0.6'
gem 'simplecov-lcov'
end
10 changes: 8 additions & 2 deletions spec/support/simplecov.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d7cf71

Please sign in to comment.