Permalink
Browse files

travis: use Xcode 8.1 on Sierra.

For code coverage from `brew test-bot`.
  • Loading branch information...
1 parent 52691cd commit dc8189833165ce263ce323a1c8de5dfd44597e3b @MikeMcQuaid MikeMcQuaid committed Dec 4, 2016
Showing with 9 additions and 4 deletions.
  1. +2 −2 .travis.yml
  2. +7 −2 Library/Homebrew/cask/cmd/brew-cask-tests.rb
View
@@ -3,7 +3,7 @@ language: ruby
matrix:
include:
- os: osx
- osx_image: xcode8.0
+ osx_image: xcode8.1
rvm: system
- os: linux
rvm: 2.0.0
@@ -13,7 +13,7 @@ before_install:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
HOMEBREW_REPOSITORY="$(brew --repo)";
sudo rm -rf "$HOMEBREW_REPOSITORY";
- ln -s "$PWD" "$HOMEBREW_REPOSITORY";
+ sudo ln -s "$PWD" "$HOMEBREW_REPOSITORY";
else
export PATH="$PWD/bin:$PATH";
umask 022;
@@ -24,7 +24,11 @@ def run_tests(executable, files, args = [])
rspec = ARGV.flag?("--rspec") || !ARGV.flag?("--minitest")
minitest = ARGV.flag?("--minitest") || !ARGV.flag?("--rspec")
- ENV["HOMEBREW_TESTS_COVERAGE"] = "1" if ARGV.flag?("--coverage")
+ p [:coverage, ARGV.flag?("--coverage"), ENV["CI"], ENV["TRAVIS"]]
+ if ARGV.flag?("--coverage")
+ ENV["HOMEBREW_TESTS_COVERAGE"] = "1"
+ upload_coverage = ENV["CODECOV_TOKEN"] || ENV["TRAVIS"]
+ end
failed = false
@@ -46,7 +50,8 @@ def run_tests(executable, files, args = [])
Homebrew.failed = failed
- if ENV["CODECOV_TOKEN"]
+ if upload_coverage
+ puts "Submitting Codecov coverage..."
system "bundle", "exec", "rake", "test:coverage:upload"
end
end

0 comments on commit dc81898

Please sign in to comment.