diff options
| author | Alyssa Ross | 2016-09-20 16:39:16 +0100 |
|---|---|---|
| committer | Alyssa Ross | 2016-09-20 16:39:16 +0100 |
| commit | ad17bbff9c59ef5d0490e6af317f7ce2d3069f69 (patch) | |
| tree | 2c4214fbdec51e26136f45413093bcdf898b761b /Library/Homebrew | |
| parent | 869fb0214971f3dbcccbe1915702ffc7e7d69d16 (diff) | |
| download | brew-ad17bbff9c59ef5d0490e6af317f7ce2d3069f69.tar.bz2 | |
cask-tests: fix loading simplecov
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cask/Rakefile | 12 | ||||
| -rwxr-xr-x | Library/Homebrew/cask/cmd/brew-cask-tests.rb | 5 |
2 files changed, 13 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/Rakefile b/Library/Homebrew/cask/Rakefile index c30b2f671..fe3e75c98 100644 --- a/Library/Homebrew/cask/Rakefile +++ b/Library/Homebrew/cask/Rakefile @@ -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 diff --git a/Library/Homebrew/cask/cmd/brew-cask-tests.rb b/Library/Homebrew/cask/cmd/brew-cask-tests.rb index 2523061a2..19a21275e 100755 --- a/Library/Homebrew/cask/cmd/brew-cask-tests.rb +++ b/Library/Homebrew/cask/cmd/brew-cask-tests.rb @@ -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? |
