Skip to content

Instantly share code, notes, and snippets.

@stephanvd
Created February 23, 2016 14:00
Show Gist options
  • Save stephanvd/0fbbca1c4c0b30eaadc2 to your computer and use it in GitHub Desktop.
Save stephanvd/0fbbca1c4c0b30eaadc2 to your computer and use it in GitHub Desktop.
CodeCov setup for parallel_test gem
namespace :codecov do
desc 'Uploads the latest simplecov result set to codecov.io'
task upload: :environment do
require 'simplecov'
require 'codecov'
formatter = SimpleCov::Formatter::Codecov.new
formatter.format(SimpleCov::ResultMerger.merged_result)
end
end
# After the specs have finished
if [ $SPECS_RESULT == 0 ]; then
rake codecov:upload
fi
require 'simplecov'
SimpleCov.start
# You no longer need to require codecov or add the SimpleCov::Formatter::Codecov formatter
# require 'codecov'
# SimpleCov.formatter = SimpleCov::Formatter::Codecov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment