cask-tests: fix loading simplecov
This commit is contained in:
parent
869fb02149
commit
ad17bbff9c
@ -6,6 +6,18 @@ homebrew_repo = `brew --repository`.chomp
|
||||
$LOAD_PATH.unshift(File.expand_path("#{homebrew_repo}/Library/Homebrew"))
|
||||
$LOAD_PATH.unshift(File.expand_path("../lib", __FILE__))
|
||||
|
||||
namespace :test do
|
||||
namespace :coverage do
|
||||
desc "Upload coverage to Codecov"
|
||||
task :upload do
|
||||
require "simplecov"
|
||||
require "codecov"
|
||||
formatter = SimpleCov::Formatter::Codecov.new
|
||||
formatter.format(SimpleCov::ResultMerger.merged_result)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RuboCop::RakeTask.new(:rubocop) do |t|
|
||||
t.options = ["--force-exclusion"]
|
||||
end
|
||||
|
@ -38,10 +38,7 @@ repo_root.cd do
|
||||
end
|
||||
|
||||
if ENV["CODECOV_TOKEN"]
|
||||
require "simplecov"
|
||||
require "codecov"
|
||||
formatter = SimpleCov::Formatter::Codecov.new
|
||||
formatter.format(SimpleCov::ResultMerger.merged_result)
|
||||
system "bundle", "exec", "rake", "test:coverage:upload"
|
||||
end
|
||||
|
||||
Homebrew.failed = !$CHILD_STATUS.success?
|
||||
|
Loading…
x
Reference in New Issue
Block a user