Merge pull request #10989 from hyuraku/paralell_tests_cache_on_ci
cache parallel tests log on ci
This commit is contained in:
commit
55223555ba
20
.github/workflows/tests.yml
vendored
20
.github/workflows/tests.yml
vendored
@ -201,6 +201,16 @@ jobs:
|
|||||||
- name: Install Bundler RubyGems
|
- name: Install Bundler RubyGems
|
||||||
run: brew install-bundler-gems
|
run: brew install-bundler-gems
|
||||||
|
|
||||||
|
- name: Create parallel test log directory
|
||||||
|
run: mkdir tests
|
||||||
|
|
||||||
|
- name: Cache parallel tests log
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: tests
|
||||||
|
key: ${{ runner.os }}-${{ matrix.test-flags }}-parallel_runtime_rspec-${{ github.sha }}
|
||||||
|
restore-keys: ${{ runner.os }}-${{ matrix.test-flags }}-parallel_runtime_rspec-
|
||||||
|
|
||||||
- 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
|
||||||
@ -283,6 +293,16 @@ jobs:
|
|||||||
which svn
|
which svn
|
||||||
which svnadmin
|
which svnadmin
|
||||||
|
|
||||||
|
- name: Create parallel test log directory
|
||||||
|
run: mkdir tests
|
||||||
|
|
||||||
|
- name: Cache parallel tests log
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: tests
|
||||||
|
key: ${{ runner.os }}-parallel_runtime_rspec-${{ github.sha }}
|
||||||
|
restore-keys: ${{ runner.os }}-parallel_runtime_rspec-
|
||||||
|
|
||||||
- name: Run brew tests
|
- name: Run brew tests
|
||||||
run: brew tests --online --coverage
|
run: brew tests --online --coverage
|
||||||
env:
|
env:
|
||||||
|
@ -98,10 +98,23 @@ module Homebrew
|
|||||||
Dir.glob("test/**/*_spec.rb")
|
Dir.glob("test/**/*_spec.rb")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
parallel_rspec_log_name = "parallel_runtime_rspec"
|
||||||
|
parallel_rspec_log_name = "#{parallel_rspec_log_name}.no_compat" if args.no_compat?
|
||||||
|
parallel_rspec_log_name = "#{parallel_rspec_log_name}.generic" if args.generic?
|
||||||
|
parallel_rspec_log_name = "#{parallel_rspec_log_name}.online" if args.online?
|
||||||
|
parallel_rspec_log_name = "#{parallel_rspec_log_name}.log"
|
||||||
|
|
||||||
|
parallel_rspec_log_path = if ENV["CI"]
|
||||||
|
"tests/#{parallel_rspec_log_name}"
|
||||||
|
else
|
||||||
|
"#{HOMEBREW_CACHE}/#{parallel_rspec_log_name}"
|
||||||
|
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 +133,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