Skip to content

Commit f1d4c4b

Browse files
authored
Merge pull request #2607 from MikeMcQuaid/travis-ci-tweaks-2
Travis CI tweaks.
2 parents e4ecf6d + 9853a78 commit f1d4c4b

File tree

5 files changed

+48
-34
lines changed

5 files changed

+48
-34
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ cache:
33
directories:
44
- $HOME/.gem/ruby
55
- Library/Homebrew/vendor/bundle
6+
# For parallel_rspec
7+
- Library/Homebrew/tmp
68

79
matrix:
810
include:
911
- os: osx
1012
osx_image: xcode8.3
1113
rvm: system
1214
- os: linux
15+
sudo: false
1316
rvm: 2.0.0
1417

1518
before_install:

Library/Homebrew/dev-cmd/tap-new.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ def tap_new
4949
env: OSX=10.12
5050
osx_image: xcode8.3
5151
rvm: system
52+
cache:
53+
directories:
54+
- $HOME/.gem/ruby
55+
- Library/Homebrew/vendor/bundle
5256
5357
before_install:
5458
- export TRAVIS_COMMIT="$(git rev-parse --verify -q HEAD)"

Library/Homebrew/dev-cmd/tests.rb

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,24 @@ def tests
7979
Dir.glob("test/**/*_spec.rb").reject { |p| p =~ %r{^test/vendor/bundle/} }
8080
end
8181

82-
opts = []
83-
84-
if ENV["CI"]
85-
opts << "--combine-stderr"
86-
opts << "--serialize-stdout"
82+
opts = if ENV["CI"]
83+
%w[
84+
--combine-stderr
85+
--serialize-stdout
86+
]
87+
else
88+
%w[
89+
--nice
90+
]
8791
end
8892

89-
args = [
90-
"--color",
91-
"-I", HOMEBREW_LIBRARY_PATH/"test",
92-
"--require", "spec_helper",
93-
"--format", "progress",
94-
"--format", "ParallelTests::RSpec::RuntimeLogger",
95-
"--out", "tmp/parallel_runtime_rspec.log"
93+
args = ["-I", HOMEBREW_LIBRARY_PATH/"test"]
94+
args += %w[
95+
--color
96+
--require spec_helper
97+
--format progress
98+
--format ParallelTests::RSpec::RuntimeLogger
99+
--out tmp/parallel_runtime_rspec.log
96100
]
97101

98102
args << "--seed" << ARGV.next if ARGV.include? "--seed"

Library/Homebrew/formula_installer.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,9 @@ def build
656656
Sandbox.print_sandbox_message if Sandbox.formula?(formula)
657657

658658
Utils.safe_fork do
659-
# Invalidate the current sudo timestamp in case a build script calls sudo
660-
system "/usr/bin/sudo", "-k"
659+
# Invalidate the current sudo timestamp in case a build script calls sudo.
660+
# Travis CI's Linux sudoless workers have a weird sudo that fails here.
661+
system "/usr/bin/sudo", "-k" unless ENV["TRAVIS_SUDO"] == "false"
661662

662663
if Sandbox.formula?(formula)
663664
sandbox = Sandbox.new

Library/Homebrew/test/Gemfile.lock

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,53 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
ast (2.3.0)
5-
codecov (0.1.9)
5+
codecov (0.1.10)
66
json
77
simplecov
88
url
99
diff-lcs (1.3)
1010
docile (1.1.5)
11-
json (2.0.3)
12-
parallel (1.10.0)
13-
parallel_tests (2.13.0)
11+
json (2.1.0)
12+
parallel (1.11.2)
13+
parallel_tests (2.14.1)
1414
parallel
1515
parser (2.4.0.0)
1616
ast (~> 2.2)
1717
powerpack (0.1.1)
18-
rainbow (2.2.1)
19-
rspec (3.5.0)
20-
rspec-core (~> 3.5.0)
21-
rspec-expectations (~> 3.5.0)
22-
rspec-mocks (~> 3.5.0)
23-
rspec-core (3.5.4)
24-
rspec-support (~> 3.5.0)
25-
rspec-expectations (3.5.0)
18+
rainbow (2.2.2)
19+
rake
20+
rake (12.0.0)
21+
rspec (3.6.0)
22+
rspec-core (~> 3.6.0)
23+
rspec-expectations (~> 3.6.0)
24+
rspec-mocks (~> 3.6.0)
25+
rspec-core (3.6.0)
26+
rspec-support (~> 3.6.0)
27+
rspec-expectations (3.6.0)
2628
diff-lcs (>= 1.2.0, < 2.0)
27-
rspec-support (~> 3.5.0)
29+
rspec-support (~> 3.6.0)
2830
rspec-its (1.2.0)
2931
rspec-core (>= 3.0.0)
3032
rspec-expectations (>= 3.0.0)
31-
rspec-mocks (3.5.0)
33+
rspec-mocks (3.6.0)
3234
diff-lcs (>= 1.2.0, < 2.0)
33-
rspec-support (~> 3.5.0)
34-
rspec-support (3.5.0)
35+
rspec-support (~> 3.6.0)
36+
rspec-support (3.6.0)
3537
rspec-wait (0.0.9)
3638
rspec (>= 3, < 4)
37-
rubocop (0.47.1)
39+
rubocop (0.48.1)
3840
parser (>= 2.3.3.1, < 3.0)
3941
powerpack (~> 0.1)
4042
rainbow (>= 1.99.1, < 3.0)
4143
ruby-progressbar (~> 1.7)
4244
unicode-display_width (~> 1.0, >= 1.0.1)
4345
ruby-progressbar (1.8.1)
44-
simplecov (0.13.0)
46+
simplecov (0.14.1)
4547
docile (~> 1.1.0)
4648
json (>= 1.8, < 3)
4749
simplecov-html (~> 0.10.0)
4850
simplecov-html (0.10.0)
49-
unicode-display_width (1.1.3)
51+
unicode-display_width (1.2.1)
5052
url (0.3.2)
5153

5254
PLATFORMS
@@ -62,4 +64,4 @@ DEPENDENCIES
6264
simplecov
6365

6466
BUNDLED WITH
65-
1.14.5
67+
1.14.6

0 commit comments

Comments
 (0)