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
|
rvm: 2.0.0
|
||||||
os: linux
|
os: linux
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: osx
|
|
||||||
env: OSX=10.11
|
|
||||||
osx_image: xcode7.3
|
|
||||||
rvm: system
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- export HOMEBREW_DEVELOPER=1
|
- export HOMEBREW_DEVELOPER=1
|
||||||
- export PATH="bin:$PATH"
|
- export PATH="bin:$PATH"
|
||||||
|
@ -12,7 +12,7 @@ group :development do
|
|||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem "coveralls", require: false
|
gem "codecov", require: false
|
||||||
gem "minitest", "5.4.1"
|
gem "minitest", "5.4.1"
|
||||||
gem "minitest-reporters"
|
gem "minitest-reporters"
|
||||||
gem "mocha", "1.1.0", require: false
|
gem "mocha", "1.1.0", require: false
|
||||||
|
@ -5,13 +5,11 @@ GEM
|
|||||||
ast (2.3.0)
|
ast (2.3.0)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
byebug (9.0.5)
|
byebug (9.0.5)
|
||||||
|
codecov (0.1.5)
|
||||||
|
json
|
||||||
|
simplecov
|
||||||
|
url
|
||||||
coderay (1.1.1)
|
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)
|
diff-lcs (1.2.5)
|
||||||
docile (1.1.5)
|
docile (1.1.5)
|
||||||
json (2.0.2)
|
json (2.0.2)
|
||||||
@ -71,17 +69,14 @@ GEM
|
|||||||
simplecov-html (~> 0.10.0)
|
simplecov-html (~> 0.10.0)
|
||||||
simplecov-html (0.10.0)
|
simplecov-html (0.10.0)
|
||||||
slop (3.6.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)
|
unicode-display_width (1.1.0)
|
||||||
|
url (0.3.2)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
coveralls
|
codecov
|
||||||
minitest (= 5.4.1)
|
minitest (= 5.4.1)
|
||||||
minitest-reporters
|
minitest-reporters
|
||||||
mocha (= 1.1.0)
|
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`.
|
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)
|
[](https://gitter.im/caskroom/homebrew-cask)
|
||||||
|
|
||||||
## Let’s try it!
|
## Let’s try it!
|
||||||
|
@ -23,10 +23,11 @@ namespace :test do
|
|||||||
|
|
||||||
Rake::Task[:test].invoke
|
Rake::Task[:test].invoke
|
||||||
|
|
||||||
if ENV["TRAVIS"]
|
if ENV["CODECOV_TOKEN"]
|
||||||
require "coveralls/rake/task"
|
require "simplecov"
|
||||||
Coveralls::RakeTask.new
|
require "codecov"
|
||||||
Rake::Task['coveralls:push'].invoke
|
formatter = SimpleCov::Formatter::Codecov.new
|
||||||
|
formatter.format(SimpleCov::ResultMerger.merged_result)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -59,8 +59,7 @@
|
|||||||
#:
|
#:
|
||||||
#: If `--no-pull` is passed, don't use `brew pull` when possible.
|
#: If `--no-pull` is passed, don't use `brew pull` when possible.
|
||||||
#:
|
#:
|
||||||
#: If `--coverage` is passed, generate coverage report and send it to
|
#: If `--coverage` is passed, generate and uplaod a coverage report.
|
||||||
#: Coveralls.
|
|
||||||
#:
|
#:
|
||||||
#: If `--test-default-formula` is passed, use a default testing formula
|
#: If `--test-default-formula` is passed, use a default testing formula
|
||||||
#: when not building a tap and no other formulae are specified.
|
#: 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-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
|
#: If `--ci-upload` is passed, use the Homebrew CI bottle upload
|
||||||
#: options.
|
#: options.
|
||||||
#:
|
#:
|
||||||
@ -709,18 +711,24 @@ module Homebrew
|
|||||||
return if @skip_homebrew
|
return if @skip_homebrew
|
||||||
|
|
||||||
if !@tap && (@formulae.empty? || @test_default_formula)
|
if !@tap && (@formulae.empty? || @test_default_formula)
|
||||||
tests_args = ["--official-cmd-taps"]
|
coverage_args = []
|
||||||
tests_args_no_compat = []
|
if ARGV.include?("--coverage")
|
||||||
tests_args_no_compat << "--coverage" if ARGV.include?("--coverage")
|
if ENV["JENKINS_HOME"]
|
||||||
test "brew", "tests", *tests_args
|
if OS.mac? && MacOS.version == :el_capitan
|
||||||
test "brew", "tests", "--generic", *tests_args
|
coverage_args << "--coverage"
|
||||||
test "brew", "tests", "--no-compat", *tests_args_no_compat
|
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"
|
test "brew", "readall", "--syntax"
|
||||||
if OS.mac?
|
if OS.mac?
|
||||||
run_as_not_developer { test "brew", "tap", "caskroom/cask" }
|
run_as_not_developer { test "brew", "tap", "caskroom/cask" }
|
||||||
tests_args_cask = []
|
test "brew", "cask-tests", *coverage_args
|
||||||
tests_args_cask << "--coverage" if ARGV.include?("--coverage")
|
|
||||||
test "brew", "cask-tests", *tests_args_cask
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: try to fix this on Linux at some stage.
|
# TODO: try to fix this on Linux at some stage.
|
||||||
@ -1003,17 +1011,30 @@ module Homebrew
|
|||||||
ENV["HOMEBREW_FAIL_LOG_LINES"] = "150"
|
ENV["HOMEBREW_FAIL_LOG_LINES"] = "150"
|
||||||
ENV["HOMEBREW_EXPERIMENTAL_FILTER_FLAGS_ON_DEPS"] = "1"
|
ENV["HOMEBREW_EXPERIMENTAL_FILTER_FLAGS_ON_DEPS"] = "1"
|
||||||
|
|
||||||
if ENV["TRAVIS"]
|
travis = !ENV["TRAVIS"].nil?
|
||||||
|
if travis
|
||||||
ARGV << "--verbose"
|
ARGV << "--verbose"
|
||||||
ARGV << "--ci-master" if ENV["TRAVIS_PULL_REQUEST"] == "false"
|
|
||||||
ENV["HOMEBREW_VERBOSE_USING_DOTS"] = "1"
|
ENV["HOMEBREW_VERBOSE_USING_DOTS"] = "1"
|
||||||
|
end
|
||||||
|
|
||||||
# Only report coverage if build runs on macOS and this is indeed Homebrew,
|
# 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.
|
# as we don't want this to be averaged with inferior Linux test coverage.
|
||||||
repo = ENV["TRAVIS_REPO_SLUG"]
|
if OS.mac? && (ENV["COVERALLS_REPO_TOKEN"] || ENV["CODECOV_TOKEN"])
|
||||||
if repo && repo.start_with?("Homebrew/") && ENV["OSX"]
|
|
||||||
ARGV << "--coverage"
|
ARGV << "--coverage"
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
if ARGV.include?("--ci-master") || ARGV.include?("--ci-pr") \
|
if ARGV.include?("--ci-master") || ARGV.include?("--ci-pr") \
|
||||||
|
@ -13,5 +13,5 @@ group :coverage do
|
|||||||
:git => "https://github.com/colszowka/simplecov.git",
|
:git => "https://github.com/colszowka/simplecov.git",
|
||||||
:branch => "master", # commit 257e26394c464c4ab388631b4eff1aa98c37d3f1
|
:branch => "master", # commit 257e26394c464c4ab388631b4eff1aa98c37d3f1
|
||||||
:require => false
|
:require => false
|
||||||
gem "coveralls", "0.8.14", :require => false
|
gem "codecov", require: false
|
||||||
end
|
end
|
||||||
|
@ -11,12 +11,10 @@ GIT
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
coveralls (0.8.14)
|
codecov (0.1.5)
|
||||||
json (>= 1.8, < 3)
|
json
|
||||||
simplecov (~> 0.12.0)
|
simplecov
|
||||||
term-ansicolor (~> 1.3)
|
url
|
||||||
thor (~> 0.19.1)
|
|
||||||
tins (~> 1.6.0)
|
|
||||||
docile (1.1.5)
|
docile (1.1.5)
|
||||||
json (1.8.3)
|
json (1.8.3)
|
||||||
metaclass (0.0.4)
|
metaclass (0.0.4)
|
||||||
@ -25,16 +23,13 @@ GEM
|
|||||||
metaclass (~> 0.0.1)
|
metaclass (~> 0.0.1)
|
||||||
rake (10.5.0)
|
rake (10.5.0)
|
||||||
simplecov-html (0.10.0)
|
simplecov-html (0.10.0)
|
||||||
term-ansicolor (1.3.2)
|
url (0.3.2)
|
||||||
tins (~> 1.0)
|
|
||||||
thor (0.19.1)
|
|
||||||
tins (1.6.0)
|
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
coveralls (= 0.8.14)
|
codecov
|
||||||
minitest (~> 5.3)
|
minitest (~> 5.3)
|
||||||
mocha (~> 1.1)
|
mocha (~> 1.1)
|
||||||
rake (~> 10.3)
|
rake (~> 10.3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user