cache paralell tests log on ci
This commit is contained in:
parent
2dc86a28a9
commit
0ebc90ee67
7
.github/workflows/tests.yml
vendored
7
.github/workflows/tests.yml
vendored
@ -201,6 +201,13 @@ jobs:
|
|||||||
- name: Install Bundler RubyGems
|
- name: Install Bundler RubyGems
|
||||||
run: brew install-bundler-gems
|
run: brew install-bundler-gems
|
||||||
|
|
||||||
|
- name: Cache parallel tests log
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: /tests/parallel_runtime_rspec.log
|
||||||
|
key: ${{ runner.os }}-parallel_runtime_rspec-${{ hashFiles('**/parallel_runtime_rspec.log') }}
|
||||||
|
restore-keys: ${{ runner.os }}-parallel_runtime_rspec.log
|
||||||
|
|
||||||
- name: Run brew tests
|
- name: Run brew tests
|
||||||
run: |
|
run: |
|
||||||
# brew tests doesn't like world writable directories
|
# brew tests doesn't like world writable directories
|
||||||
|
|||||||
@ -98,10 +98,17 @@ module Homebrew
|
|||||||
Dir.glob("test/**/*_spec.rb")
|
Dir.glob("test/**/*_spec.rb")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
parallel_rspec_log_path =if ENV["CI"]
|
||||||
|
"/tests/parallel_runtime_rspec.log"
|
||||||
|
else
|
||||||
|
"#{HOMEBREW_CACHE}/tests/parallel_runtime_rspec.log"
|
||||||
|
end
|
||||||
|
|
||||||
parallel_args = if ENV["CI"]
|
parallel_args = if ENV["CI"]
|
||||||
%w[
|
%W[
|
||||||
--combine-stderr
|
--combine-stderr
|
||||||
--serialize-stdout
|
--serialize-stdout
|
||||||
|
--runtime-log "#{parallel_rspec_log_path}"
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
%w[
|
%w[
|
||||||
@ -120,7 +127,7 @@ module Homebrew
|
|||||||
--require spec_helper
|
--require spec_helper
|
||||||
--format NoSeedProgressFormatter
|
--format NoSeedProgressFormatter
|
||||||
--format ParallelTests::RSpec::RuntimeLogger
|
--format ParallelTests::RSpec::RuntimeLogger
|
||||||
--out #{HOMEBREW_CACHE}/tests/parallel_runtime_rspec.log
|
--out #{parallel_rspec_log_path}
|
||||||
]
|
]
|
||||||
|
|
||||||
bundle_args << "--format" << "RSpec::Github::Formatter" if ENV["GITHUB_ACTIONS"]
|
bundle_args << "--format" << "RSpec::Github::Formatter" if ENV["GITHUB_ACTIONS"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user