Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Only use coveralls and simplecov on RUBY_ENGINE=ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
timcraft committed Jan 7, 2020
1 parent 5e20338 commit bfd5161
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ rvm:
- jruby-9.2.8.0
- truffleruby
script:
- bundle exec rake test_with_coveralls
- bundle exec rake ci
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ gem 'rake', '~> 13'
gem 'minitest', '~> 5'
gem 'webmock', '~> 3'
gem 'yard', '~> 0.9'
gem 'simplecov', '~> 0.16'
gem 'coveralls', '~> 0.8'

platforms :ruby do
gem 'simplecov', '~> 0.16'
gem 'coveralls', '~> 0.8'
end
11 changes: 8 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'rake/testtask'
require 'yard'
require 'coveralls/rake/task'

task :default => :test

Expand All @@ -11,6 +10,12 @@ end

YARD::Rake::YardocTask.new

Coveralls::RakeTask.new
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
require 'coveralls/rake/task'

task :test_with_coveralls => [:test, 'coveralls:push']
Coveralls::RakeTask.new

task :ci => [:test, 'coveralls:push']
else
task :ci => :test
end
8 changes: 5 additions & 3 deletions test/nexmo/test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
require 'simplecov'
if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
require 'simplecov'

SimpleCov.start do
add_filter 'test/nexmo'
SimpleCov.start do
add_filter 'test/nexmo'
end
end

require 'minitest/autorun'
Expand Down

0 comments on commit bfd5161

Please sign in to comment.