Send coverage from Jenkins, don't run OS X Travis.
OS X Travis CI is particularly error-prone, slow and unnecessary for us when we're already running (fast) OS X builds on Jenkins so use it just for Linux testing.
This commit is contained in:
parent
ddafaaecfc
commit
b1fba6ed54
@ -2,13 +2,6 @@ language: ruby
|
||||
rvm: 2.0.0
|
||||
os: linux
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
env: OSX=10.11
|
||||
osx_image: xcode7.3
|
||||
rvm: system
|
||||
|
||||
before_install:
|
||||
- export HOMEBREW_DEVELOPER=1
|
||||
- export PATH="bin:$PATH"
|
||||
|
@ -12,7 +12,7 @@ group :development do
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem "coveralls", require: false
|
||||
gem "codecov", require: false
|
||||
gem "minitest", "5.4.1"
|
||||
gem "minitest-reporters"
|
||||
gem "mocha", "1.1.0", require: false
|
||||
|
@ -5,13 +5,11 @@ GEM
|
||||
ast (2.3.0)
|
||||
builder (3.2.2)
|
||||
byebug (9.0.5)
|
||||
codecov (0.1.5)
|
||||
json
|
||||
simplecov
|
||||
url
|
||||
coderay (1.1.1)
|
||||
coveralls (0.8.15)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov (~> 0.12.0)
|
||||
term-ansicolor (~> 1.3)
|
||||
thor (~> 0.19.1)
|
||||
tins (>= 1.6.0, < 2)
|
||||
diff-lcs (1.2.5)
|
||||
docile (1.1.5)
|
||||
json (2.0.2)
|
||||
@ -71,17 +69,14 @@ GEM
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.0)
|
||||
slop (3.6.0)
|
||||
term-ansicolor (1.3.2)
|
||||
tins (~> 1.0)
|
||||
thor (0.19.1)
|
||||
tins (1.12.0)
|
||||
unicode-display_width (1.1.0)
|
||||
url (0.3.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
coveralls
|
||||
codecov
|
||||
minitest (= 5.4.1)
|
||||
minitest-reporters
|
||||
mocha (= 1.1.0)
|
||||
|
@ -8,9 +8,6 @@ We do this by providing a friendly Homebrew-style CLI workflow for the administr
|
||||
|
||||
It’s implemented as a `homebrew` [external command](https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/External-Commands.md) called `cask`.
|
||||
|
||||
[](https://travis-ci.org/caskroom/homebrew-cask)
|
||||
[](https://codeclimate.com/github/caskroom/homebrew-cask)
|
||||
[](https://coveralls.io/r/caskroom/homebrew-cask)
|
||||
[](https://gitter.im/caskroom/homebrew-cask)
|
||||
|
||||
## Let’s try it!
|
||||
|
@ -23,10 +23,11 @@ namespace :test do
|
||||
|
||||
Rake::Task[:test].invoke
|
||||
|
||||
if ENV["TRAVIS"]
|
||||
require "coveralls/rake/task"
|
||||
Coveralls::RakeTask.new
|
||||
Rake::Task['coveralls:push'].invoke
|
||||
if ENV["CODECOV_TOKEN"]
|
||||
require "simplecov"
|
||||
require "codecov"
|
||||
formatter = SimpleCov::Formatter::Codecov.new
|
||||
formatter.format(SimpleCov::ResultMerger.merged_result)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -59,8 +59,7 @@
|
||||
#:
|
||||
#: If `--no-pull` is passed, don't use `brew pull` when possible.
|
||||
#:
|
||||
#: If `--coverage` is passed, generate coverage report and send it to
|
||||
#: Coveralls.
|
||||
#: If `--coverage` is passed, generate and uplaod a coverage report.
|
||||
#:
|
||||
#: If `--test-default-formula` is passed, use a default testing formula
|
||||
#: when not building a tap and no other formulae are specified.
|
||||
@ -72,6 +71,9 @@
|
||||
#:
|
||||
#: If `--ci-testing` is passed, use the Homebrew testing CI options.
|
||||
#:
|
||||
#: If `--ci-auto` is passed, automatically pick one of the Homebrew CI
|
||||
#: options based on the environment.
|
||||
#:
|
||||
#: If `--ci-upload` is passed, use the Homebrew CI bottle upload
|
||||
#: options.
|
||||
#:
|
||||
@ -709,18 +711,24 @@ module Homebrew
|
||||
return if @skip_homebrew
|
||||
|
||||
if !@tap && (@formulae.empty? || @test_default_formula)
|
||||
tests_args = ["--official-cmd-taps"]
|
||||
tests_args_no_compat = []
|
||||
tests_args_no_compat << "--coverage" if ARGV.include?("--coverage")
|
||||
test "brew", "tests", *tests_args
|
||||
test "brew", "tests", "--generic", *tests_args
|
||||
test "brew", "tests", "--no-compat", *tests_args_no_compat
|
||||
coverage_args = []
|
||||
if ARGV.include?("--coverage")
|
||||
if ENV["JENKINS_HOME"]
|
||||
if OS.mac? && MacOS.version == :el_capitan
|
||||
coverage_args << "--coverage"
|
||||
end
|
||||
else
|
||||
coverage_args << "--coverage"
|
||||
end
|
||||
end
|
||||
|
||||
test "brew", "tests", "--no-compat"
|
||||
test "brew", "tests", "--generic"
|
||||
test "brew", "tests", "--official-cmd-taps", *coverage_args
|
||||
test "brew", "readall", "--syntax"
|
||||
if OS.mac?
|
||||
run_as_not_developer { test "brew", "tap", "caskroom/cask" }
|
||||
tests_args_cask = []
|
||||
tests_args_cask << "--coverage" if ARGV.include?("--coverage")
|
||||
test "brew", "cask-tests", *tests_args_cask
|
||||
test "brew", "cask-tests", *coverage_args
|
||||
end
|
||||
|
||||
# TODO: try to fix this on Linux at some stage.
|
||||
@ -1003,17 +1011,30 @@ module Homebrew
|
||||
ENV["HOMEBREW_FAIL_LOG_LINES"] = "150"
|
||||
ENV["HOMEBREW_EXPERIMENTAL_FILTER_FLAGS_ON_DEPS"] = "1"
|
||||
|
||||
if ENV["TRAVIS"]
|
||||
travis = !ENV["TRAVIS"].nil?
|
||||
if travis
|
||||
ARGV << "--verbose"
|
||||
ARGV << "--ci-master" if ENV["TRAVIS_PULL_REQUEST"] == "false"
|
||||
ENV["HOMEBREW_VERBOSE_USING_DOTS"] = "1"
|
||||
end
|
||||
|
||||
# Only report coverage if build runs on macOS and this is indeed Homebrew,
|
||||
# as we don't want this to be averaged with inferior Linux test coverage.
|
||||
repo = ENV["TRAVIS_REPO_SLUG"]
|
||||
if repo && repo.start_with?("Homebrew/") && ENV["OSX"]
|
||||
if OS.mac? && (ENV["COVERALLS_REPO_TOKEN"] || ENV["CODECOV_TOKEN"])
|
||||
ARGV << "--coverage"
|
||||
end
|
||||
|
||||
travis_pr = ENV["TRAVIS_PULL_REQUEST"] && ENV["TRAVIS_PULL_REQUEST"] != "false"
|
||||
jenkins_pr = !ENV["ghprbPullLink"].nil?
|
||||
jenkins_branch = !ENV["GIT_COMMIT"].nil?
|
||||
|
||||
if ARGV.include?("--ci-auto")
|
||||
if travis_pr || jenkins_pr
|
||||
ARGV << "--ci-pr"
|
||||
elsif travis || jenkins_branch
|
||||
ARGV << "--ci-master"
|
||||
else
|
||||
ARGV << "--ci-testing"
|
||||
end
|
||||
end
|
||||
|
||||
if ARGV.include?("--ci-master") || ARGV.include?("--ci-pr") \
|
||||
|
@ -13,5 +13,5 @@ group :coverage do
|
||||
:git => "https://github.com/colszowka/simplecov.git",
|
||||
:branch => "master", # commit 257e26394c464c4ab388631b4eff1aa98c37d3f1
|
||||
:require => false
|
||||
gem "coveralls", "0.8.14", :require => false
|
||||
gem "codecov", require: false
|
||||
end
|
||||
|
@ -11,12 +11,10 @@ GIT
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
coveralls (0.8.14)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov (~> 0.12.0)
|
||||
term-ansicolor (~> 1.3)
|
||||
thor (~> 0.19.1)
|
||||
tins (~> 1.6.0)
|
||||
codecov (0.1.5)
|
||||
json
|
||||
simplecov
|
||||
url
|
||||
docile (1.1.5)
|
||||
json (1.8.3)
|
||||
metaclass (0.0.4)
|
||||
@ -25,16 +23,13 @@ GEM
|
||||
metaclass (~> 0.0.1)
|
||||
rake (10.5.0)
|
||||
simplecov-html (0.10.0)
|
||||
term-ansicolor (1.3.2)
|
||||
tins (~> 1.0)
|
||||
thor (0.19.1)
|
||||
tins (1.6.0)
|
||||
url (0.3.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
coveralls (= 0.8.14)
|
||||
codecov
|
||||
minitest (~> 5.3)
|
||||
mocha (~> 1.1)
|
||||
rake (~> 10.3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user